Commit 8323a2a0 authored by Richard Mansfield's avatar Richard Mansfield
Browse files
parents 83d3f7cb d0843e15
mahara (0.4.1-1) unstable; urgency=low
* Bugfix release
-- Martyn Smith <martyn@catalyst.net.nz> Tue, 23 Jan 2007 13:13:22 +1300
mahara (0.4.0-1) unstable; urgency=low
* Bugfix release
......
......@@ -370,6 +370,7 @@ $string['alreadyinwatchlist'] = 'This %s is already in your watchlist';
$string['complaint'] = 'Complaint';
$string['date'] = 'Date';
$string['feedback'] = 'Feedback';
$string['feedbackmadeprivate'] = 'Feedback changed to private';
$string['feedbacksubmitted'] = 'Feedback submitted';
$string['makepublic'] = 'Make public';
$string['nopublicfeedback'] = 'No public feedback';
......@@ -377,6 +378,7 @@ $string['notifysiteadministrator'] = 'Notify site administrator';
$string['placefeedback'] = 'Place feedback';
$string['print'] = 'Print';
$string['private'] = 'Private';
$string['makeprivate'] = 'Change to Private';
$string['reportobjectionablematerial'] = 'Report objectionable material';
$string['reportsent'] = 'Your report has been sent';
$string['updatewatchlistfailed'] = 'Update of watchlist failed';
......@@ -503,6 +505,7 @@ $string['currentfriends'] = 'Friends';
$string['pendingfriends'] = 'Pending friends';
$string['friendlistfailure'] = 'Failed to modify your friends list';
$string['userdoesntwantfriends'] = 'This user doesn\'t want any new friends';
$string['friend'] = 'Friend';
$string['profileicon'] = 'Profile Icon';
......@@ -530,6 +533,8 @@ $string['virusrepeatmessage'] = 'The user %s has uploaded multiple files which h
$string['youraccounthasbeensuspended'] = 'Your account has been suspended';
$string['youraccounthasbeensuspendedtext'] = 'Your account has been suspended'; // @todo: more info?
$string['youraccounthasbeenunsuspended'] = 'Your account has been unsuspended';
$string['youraccounthasbeenunsuspendedtext'] = 'Your account has been unsuspended'; // @todo: more info?
?>
......@@ -61,6 +61,8 @@ $string['empty_block'] = 'Select an artefact from the tree on the left to place
$string['viewinformationsaved'] = 'View information saved successfully';
$string['canteditdontown'] = 'You can\'t edit this view because you don\'t own it';
$string['canteditdontownfeedback'] = 'You can\'t edit this feedback because you don\'t own it';
$string['feedbackchangedtoprivate'] = 'Feedback changed to private';
$string['chooseformat'] = 'Select how you would like to display this artefact in this block ...';
......
......@@ -28,7 +28,7 @@ defined('INTERNAL') || die();
$config = new StdClass;
$config->version = 2007012300;
$config->release = '0.4.0';
$config->release = '0.4.1';
$config->minupgradefrom = 2006121501;
$config->minupgraderelease = '0.1 (build tag BUILD_20061215)';
......
......@@ -25,25 +25,36 @@ a:hover {
h1, h2 {
color: #547c22;
font-size: 20px;
font-size: 22px;
font-weight: normal;
margin: 0 0 5px 0;
padding: 0;
text-transform: capitalize;
border-bottom: 1px solid #819f18;
}
h2 {
font-size: 20px;
}
h3, h4 {
color: #819f18;
font-weight: bold;
font-size: 15px;
margin: 15px 0 0 0;
font-size: 17px;
margin: 15px 0 0;
text-transform: capitalize;
}
h4 {
font-size: 15px;
}
h5, h6 {
color: #5c8727;
font-weight: bold;
font-size: 18px;
margin: 0;
font-size: 14px;
margin: 5px 0 0;
}
h6 {
font-size: 13px;
}
form {
......
......@@ -22,19 +22,34 @@ a:hover {
h1, h2 {
color: #547c22 !important;
font-size: 20px !important;
font-size: 22px !important;
font-weight: normal !important;
margin: 5px 0 5px 0 !important;
margin: 0 0 5px 0 !important;
padding: 0 !important;
text-transform: capitalize !important;
border-bottom: 1px solid #819f18 !important;
}
h2 {
font-size: 20px !important;
}
h3, h4, h5, h6 {
h3, h4 {
color: #819f18 !important;
font-weight: bold !important;
font-size: 14px !important;
margin: 15px 0 0 0 !important;
font-size: 17px !important;
margin: 15px 0 0 !important;
text-transform: capitalize !important;
}
h4 {
font-size: 15px !important;
}
h5, h6 {
color: #5c8727 !important;
font-weight: bold !important;
font-size: 14px !important;
margin: 5px 0 0 !important;
}
h6 {
font-size: 13px !important;
}
......@@ -248,8 +248,8 @@ else if ($request = get_friend_request($userid, $loggedinid)) {
else {
$friendscontrol = get_account_preference($userid, 'friendscontrol');
if ($friendscontrol == 'nobody') {
$friendtype = 'remove';
$friendsubmit = get_string('removefromfriendslist');
$friendtype = '';
$friendformmessage = get_string('userdoesntwantfriends');
}
else if ($friendscontrol == 'auth') {
$friendform['elements']['reason'] = array(
......
<?php
/**
* This program is part of Mahara
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* @package mahara
* @subpackage core
* @author Martyn Smith <martyn@catalyst.net.nz>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 2006,2007 Catalyst IT Ltd http://catalyst.net.nz
*
*/
define('INTERNAL', 1);
define('JSON', 1);
require(dirname(dirname(__FILE__)) . '/init.php');
$feedback_id = param_integer('id');
$feedback_table = param_variable('table');
if ($feedback_table != 'view_feedback' && $feedback_table != 'artefact_feedback') {
json_reply('local', 'Invalid table type');
}
$view_id = get_field($feedback_table, 'view', 'id', $feedback_id);
$owner = get_field('view', 'owner', 'id', $view_id);
if ($owner != $USER->get('id')) {
json_reply('local', get_string('canteditdontownfeedback', 'view'));
}
update_record($feedback_table, (object)array('public' => 0, 'id' => $feedback_id));
json_headers();
json_reply(false,get_string('feedbackchangedtoprivate', 'view'));
?>
......@@ -60,7 +60,7 @@ else {
$publicclause = ' AND public = 1';
}
$feedback = get_records_sql_array('SELECT author, ctime, message, public
$feedback = get_records_sql_array('SELECT id, author, ctime, message, public
FROM ' . $prefix . $table . '
WHERE view = ' . $view . $whereartefactclause . $publicclause . '
ORDER BY id DESC', '', $offset, $limit);
......@@ -68,10 +68,15 @@ $feedback = get_records_sql_array('SELECT author, ctime, message, public
$data = array();
if ($feedback) {
foreach ($feedback as $record) {
$data[] = array('name' => display_name($record->author),
'date' => format_date(strtotime($record->ctime), 'strftimedate'),
'message' => $record->message,
'public' => $record->public);
$data[] = array(
'id' => $record->id,
'ownedbythisuser' => ( get_field('view', 'owner', 'id', $view) == $USER->get('id') ? true : false ),
'table' => $table,
'name' => display_name($record->author),
'date' => format_date(strtotime($record->ctime), 'strftimedate'),
'message' => $record->message,
'public' => $record->public
);
}
}
......
......@@ -177,15 +177,33 @@ addLoadEvent(view_menu);
var feedbacklist = new TableRenderer(
'feedbacktable',
'getfeedback.json.php',
['message',
'name',
'date',
function (r) {
if (r.public == 1) {
return;
}
return TD(null, '(' + get_string('private') + ')');
},
[
'message',
'name',
'date',
function (r) {
if (r.public == 1) {
var makePrivate = null;
if (r.ownedbythisuser) {
makePrivate = A({'href': ''}, get_string('makeprivate'));
connect(makePrivate, 'onclick', function (e) {
sendjsonrequest(
'changefeedback.json.php',
r,
function (data) {
if (!data.error) {
replaceChildNodes(makePrivate.parentNode, '(' + get_string('private') + ')');
}
}
);
e.stop();
});
}
return TD(null, '(' + get_string('public') + ') ', makePrivate);
}
return TD(null, '(' + get_string('private') + ')');
},
]
);
......@@ -199,7 +217,17 @@ feedbacklist.updateOnLoad();
EOF;
$smarty = smarty(array('tablerenderer'));
$smarty = smarty(
array('tablerenderer'),
array(),
array(
'mahara' => array(
'public',
'private',
'makeprivate',
),
)
);
$smarty->assign('INLINEJAVASCRIPT', $javascript);
$smarty->assign('VIEWNAV', $navlist);
if (isset($content)) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment