Commit b0effbb3 authored by Nigel McNie's avatar Nigel McNie
Browse files

A better description of the file type when viewing it in detail

parent eae301ce
......@@ -539,7 +539,7 @@ function FileUploader(element, uploadscript, statevars, foldername, folderid, up
TD(null, SPAN({'id':'uploaddest'},self.foldername))),
TR(null, TH(null,LABEL(null,get_string('copyrightnotice'))),
TD(null,INPUT({'type':'checkbox','class':'checkbox','name':'notice'}),notice)),
TR(null, TH(null, LABEL(null, get_string('file'))),
TR(null, TH(null, LABEL(null, get_string('File'))),
TD(null, INPUT({'type':'file','class':'file','name':'userfile','size':40,'onchange':function () {
self.form.title.value = basename(self.form.userfile.value);
}}))),
......
......@@ -45,7 +45,8 @@ $string['download'] = 'Download';
$string['editfile'] = 'Edit file';
$string['editfolder'] = 'Edit folder';
$string['emptyfolder'] = 'Empty folder';
$string['file'] = 'File';
$string['file'] = 'file';
$string['File'] = 'File';
$string['filealreadyindestination'] = 'The file you moved is already in that folder';
$string['files'] = 'files';
$string['fileexists'] = 'File exists';
......
......@@ -118,7 +118,7 @@ class PluginArtefactFile extends PluginArtefact {
'destination',
'editfile',
'editfolder',
'file',
'File',
'fileexistsoverwritecancel',
'filenamefieldisrequired',
'home',
......@@ -293,9 +293,15 @@ abstract class ArtefactTypeFileBase extends ArtefactType {
if (isset($options['viewid'])) {
$downloadpath .= '&view=' . $options['viewid'];
}
$filetype = get_string($this->get('oldextension'), 'artefact.file');
if (substr($filetype, 0, 2) == '[[') {
$filetype = $this->get('oldextension') . ' ' . get_string('file', 'artefact.file');
}
$smarty = smarty_core();
$smarty->assign('iconpath', $this->get_icon($options));
$smarty->assign('downloadpath', $downloadpath);
$smarty->assign('filetype', $filetype);
$smarty->assign('owner', display_name($this->get('owner')));
$smarty->assign('created', strftime(get_string('strftimedaydatetime'), $this->get('ctime')));
$smarty->assign('modified', strftime(get_string('strftimedaydatetime'), $this->get('mtime')));
......
......@@ -4,7 +4,7 @@
</div>
<table class="filedata">
<tr><th>Type:</th><td>{str tag=$artefacttype section=artefact.file}</td></tr>
<tr><th>Type:</th><td>{$filetype}</td></tr>
<tr><th>Owner:</th><td>{$owner}</td></tr>
<tr><th>Created:</th><td>{$created}</td></tr>
<tr><th>Last modified:</th><td>{$modified}</td></tr>
......
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