Skip to content
Browse files

align user interface on file upload with the one used for regular vie…

…w of file details
  • Loading branch information...
1 parent 2901c94 commit 12c4a7ab5588526e5378f4a6d055d7949d80da90 @bernard357 committed May 22, 2012
Showing with 10 additions and 8 deletions.
  1. +10 −8 files/edit.php
View
18 files/edit.php
@@ -463,12 +463,7 @@
$details = array();
// file name
- if(isset($item['file_name']) && $item['file_name'])
- $details[] = $item['file_name'];
-
- // file uploader
- if(isset($item['create_name']))
- $details[] = sprintf(i18n::s('posted by %s %s'), Users::get_link($item['create_name'], $item['create_address'], $item['create_id']), Skin::build_date($item['create_date']));
+ $name = str_replace('_', ' ', $item['file_name']);
// downloads and file size
$other_details = array();
@@ -477,7 +472,14 @@
if(isset($item['file_size']) && ($item['file_size'] > 1))
$other_details[] = Skin::build_number($item['file_size'], i18n::s('bytes'));
if(count($other_details))
- $details[] = join(', ', $other_details);
+ $name .= ' ('.join(', ', $other_details).')';
+
+ // the file itself
+ $details[] = $name;
+
+ // file uploader
+ if(isset($item['create_name']))
+ $details[] = sprintf(i18n::s('posted by %s %s'), Users::get_link($item['create_name'], $item['create_address'], $item['create_id']), Skin::build_date($item['create_date']));
if(count($details))
$input .= ucfirst(implode(BR, $details)).BR.BR;
@@ -486,7 +488,7 @@
if(Surfer::may_upload()) {
// refresh the file
- $input .= i18n::s('Select another file to replace the current one').BR
+ $input .= '<span class="details">'.i18n::s('Select another file to replace the current one').'</span>'.BR
.'<input type="file" name="upload" id="upload" size="30" />'
.' (&lt;&nbsp;'.$context['file_maximum_size'].i18n::s('bytes').')'."\n";

0 comments on commit 12c4a7a

Please sign in to comment.
Something went wrong with that request. Please try again.