Commit 3c4d4a2f authored by Jono Mingard's avatar Jono Mingard Committed by Robert Lyon
Browse files

Added descriptive text to buttons in Edit access (Bug #1262490)



Changed text from "Add" to a descriptive alternative based on whether
you're giving a group, institution or people access.

Change-Id: I3082aefb77ee9279f4d85f27ba9e33a555d3094b
Signed-off-by: default avatarJono Mingard <jonom@catalyst.net.nz>
parent 52206eac
......@@ -154,6 +154,10 @@ $string['moreoptions'] = 'Advanced options';
$string['moreinstitutions'] = 'More institutions';
$string['allviews'] = 'All pages';
$string['addaccess'] = 'Add access for "%s"';
$string['addaccessinstitution'] = 'Add access for institution "%s"';
$string['addaccessgroup'] = 'Add access for group "%s"';
$string['submitconfirm'] = 'If you submit \'%s\' to %s for assessment, you will not be able to edit its contents until your tutor has finished marking it. Are you sure you want to submit now?';
$string['viewsubmitted'] = 'Page submitted';
$string['collectionsubmitted'] = 'Collection submitted';
......
......@@ -60,7 +60,14 @@ var count = 0;
// Given a row, render it on the left hand side
function renderPotentialPresetItem(item) {
var addButton = BUTTON({'type': 'button'}, {{jstr tag=add}});
var accessString;
if (item.type == 'group' || item.type == 'institution') {
accessString = get_string('addaccess' + item.type, item.name);
}
else {
accessString = get_string('addaccess', item.name);
}
var addButton = BUTTON({'type': 'button'}, accessString);
var attribs = {};
if (item.preset) {
attribs = {'class': 'preset'};
......
......@@ -530,7 +530,7 @@ $smarty = smarty(
array(),
array(
'mahara' => array('From', 'To', 'datetimeformatguide'),
'view' => array('startdate', 'stopdate'),
'view' => array('startdate', 'stopdate', 'addaccess', 'addaccessinstitution', 'addaccessgroup'),
'artefact.comment' => array('Comments', 'Allow', 'Moderate')
),
array('sidebars' => false)
......
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