Commit 07873654 authored by Son Nguyen's avatar Son Nguyen Committed by Gerrit Code Review
Browse files

Separate the upload instruction from file description (Bug #1296961)



Only display upload instruction if users can edit files

Change-Id: If70302d9948e04e11a122d6a0fa08b50e69b82d5
Signed-off-by: default avatarSon Nguyen <son.nguyen@catalyst.net.nz>
parent 39a5a3eb
......@@ -50,4 +50,5 @@ $smarty = smarty(
$smarty->assign('heading', $group->name);
$smarty->assign('form', $form);
$smarty->assign('INLINEJAVASCRIPT', $js);
$smarty->assign('group', $group->name);
$smarty->display('artefact:file:files.tpl');
......@@ -101,7 +101,10 @@ $string['filelistloaded'] = 'File list loaded';
$string['filemoved'] = 'File moved successfully';
$string['filenamefieldisrequired'] = 'The file field is required.';
$string['filenamefieldisrequired1'] = 'The file / folder name is required.';
$string['fileinstructions'] = 'Upload your images, documents or other files for inclusion in pages. You can select multiple files to upload them at once. Drag and drop the icons to move files between folders.';
$string['filespagedescription'] = 'Here are your images, documents or other files for inclusion in pages.';
$string['groupfilespagedescription'] = 'Here are the group images, documents or other files for inclusion in pages.';
$string['institutionfilespagedescription'] = 'Here are the institution images, documents or other files for inclusion in pages.';
$string['fileuploadinstructions'] = 'You can select multiple files to upload them at once. Drag and drop the icons to move files between folders.';
$string['filethingdeleted'] = '%s deleted';
$string['filewithnameexists'] = 'A file or folder with the name "%s" already exists.';
$string['folder'] = 'Folder';
......
......@@ -2,12 +2,19 @@
{if $institution}
{$institutionselector|safe}
{/if}
{if $institution && $institution == 'mahara'}
<p class="intro">{str tag="adminfilespagedescription" section="admin" args=$descriptionstrargs}</p>
<p class="intro">{str tag="adminfilespagedescription1" section="admin" args=$descriptionstrargs}</p>
{else}
<p class="intro">{str tag='fileinstructions' section='artefact.file'}</p>
{if $institution}
<p class="intro">{str tag='institutionfilespagedescription' section='artefact.file'}</p>
{else}
{if $group}
<p class="intro">{str tag='groupfilespagedescription' section='artefact.file'}</p>
{else}
<p class="intro">{str tag='filespagedescription' section='artefact.file'}</p>
{/if}
{/if}
{/if}
<div>{$form|safe}</div>
<div>{$form|safe}</div>
{include file="footer.tpl"}
......@@ -37,6 +37,7 @@
{if $config.upload}
<div id="{$prefix}_upload_container" class="fileupload{if ($tabs && !$tabs.upload) || $uploaddisabled} hidden{/if}">
<p class="intro">{str tag='fileuploadinstructions' section='artefact.file'}</p>
{* config.uploadagreement: disable the file chooser unless the agreement is checked *}
{* config.simpleupload: the form only contains a file chooser *}
{* config.submitbutton: add submit button even if js is enabled & don't start uploading as soon as a file is chosen *}
......
......@@ -479,7 +479,7 @@ $string['footerupdated'] = 'Footer updated';
$string['footercustomlink'] = 'You can override the default page, <em>%s</em>, by entering a URL here or leave it empty to use the default value.';
// Admin Files
$string['adminfilespagedescription'] = 'Here you can upload files that can be included in the %s"Links and resources"%s menu. Files in the home directory will be able to be added to the logged-in menu, while files in the public directory will be able to be added to the public menu.';
$string['adminfilespagedescription1'] = 'Here are files that can be included in the %s"Links and resources"%s menu. Files in the home directory will be able to be added to the logged-in menu, while files in the public directory will be able to be added to the public menu.';
// License settings
$string['extralicensesdescription'] = 'Note: The following licenses are used by some content but have not been configured.';
......
......@@ -910,6 +910,7 @@ function institution_selector_for_page($institution, $page) {
$institutionselector = pieform(array(
'name' => 'institutionselect',
'checkdirtychange' => false,
'elements' => array(
'institution' => $institutionelement,
)
......
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