From 0d55613359d98958e6b21174a30235a8431595d8 Mon Sep 17 00:00:00 2001
From: Jean-Philippe Lang
- <%= file_field_tag 'attachments[]', :size => 30 %> (<%= l(:label_max_size) %>: <%= human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
+ (<%= number_to_human_size attachment.filesize %>)
<%= attachment.author.display_name %>, <%= format_date(attachment.created_on) %>
<%= lwr(:label_download, attachment.downloads) %>
@@ -31,7 +31,7 @@
<% form_tag ({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :class => "tabular") do %>
<%= link_to attachment.filename, { :action => 'download', :id => @issue, :attachment_id => attachment }, :class => 'icon icon-attachment' %> (<%= human_size(attachment.filesize) %>) | +<%= link_to attachment.filename, { :action => 'download', :id => @issue, :attachment_id => attachment }, :class => 'icon icon-attachment' %> (<%= number_to_human_size(attachment.filesize) %>) | <%= format_date(attachment.created_on) %> | <%= attachment.author.display_name %> | <%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy_attachment', :id => @issue, :attachment_id => attachment }, :confirm => l(:text_are_you_sure), :post => true, :class => 'icon icon-del' %> |
@@ -93,7 +93,7 @@ end %>
<% form_tag ({ :controller => 'issues', :action => 'add_attachment', :id => @issue }, :multipart => true, :class => "tabular") do %>
<%= link_to file.filename, :controller => 'versions', :action => 'download', :id => version, :attachment_id => file %> | <%= format_date(file.created_on) %> | -<%= human_size(file.filesize) %> | +<%= number_to_human_size(file.filesize) %> | <%= file.downloads %> | <%= file.digest %> | <% if delete_allowed %> diff --git a/app/views/repositories/_dir_list.rhtml b/app/views/repositories/_dir_list.rhtml index 717802b4a..332987f3f 100644 --- a/app/views/repositories/_dir_list.rhtml +++ b/app/views/repositories/_dir_list.rhtml @@ -11,7 +11,7 @@ @entries.each do |entry| %>|
<%= link_to h(entry.name), { :action => (entry.is_dir? ? 'browse' : 'revisions'), :id => @project, :path => entry.path, :rev => @rev }, :class => ("icon " + (entry.is_dir? ? 'icon-folder' : 'icon-file')) %> | -<%= human_size(entry.size) unless entry.is_dir? %> | +<%= number_to_human_size(entry.size) unless entry.is_dir? %> | <%= link_to entry.lastrev.identifier, :action => 'revision', :id => @project, :rev => entry.lastrev.identifier %> | <%=h entry.lastrev.author %> | <%= format_time(entry.lastrev.time) %> | @@ -20,4 +20,4 @@ end %>
<%= l(:label_total) %>: <%= human_size(total_size) %>
\ No newline at end of file +<%= l(:label_total) %>: <%= number_to_human_size(total_size) %>
\ No newline at end of file diff --git a/app/views/repositories/revisions.rhtml b/app/views/repositories/revisions.rhtml index 752be89a0..bc5a192b2 100644 --- a/app/views/repositories/revisions.rhtml +++ b/app/views/repositories/revisions.rhtml @@ -9,7 +9,7 @@ <% if @entry.is_file? %><%= link_to 'Download', {:action => 'entry', :id => @project, :path => @path, :rev => @rev, :format => 'raw' }, :class => "icon file" %> (<%= human_size @entry.size %>)
+<%= link_to 'Download', {:action => 'entry', :id => @project, :path => @path, :rev => @rev, :format => 'raw' }, :class => "icon file" %> (<%= number_to_human_size @entry.size %>)
<% end %>