replaced deprecated human_size by number_to_human_size
git-svn-id: http://redmine.rubyforge.org/svn/trunk@185 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
845460b165
commit
0d55613359
|
@ -18,7 +18,7 @@
|
|||
<%= link_to_if_authorized l(:button_delete), {:controller => 'documents', :action => 'destroy_attachment', :id => @document, :attachment_id => attachment}, :confirm => l(:text_are_you_sure), :post => true, :class => 'icon icon-del' %>
|
||||
</div>
|
||||
<%= link_to attachment.filename, :action => 'download', :id => @document, :attachment_id => attachment %>
|
||||
(<%= human_size attachment.filesize %>)<br />
|
||||
(<%= number_to_human_size attachment.filesize %>)<br />
|
||||
<em><%= attachment.author.display_name %>, <%= format_date(attachment.created_on) %></em><br />
|
||||
<%= lwr(:label_download, attachment.downloads) %>
|
||||
</li>
|
||||
|
@ -31,7 +31,7 @@
|
|||
<% form_tag ({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :class => "tabular") do %>
|
||||
<p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
|
||||
<%= image_to_function "add.png", "addFileField();return false" %></label>
|
||||
<%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
|
||||
<%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
|
||||
<%= submit_tag l(:button_add) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
for attachment in issue.attachments
|
||||
pdf.SetFont('Arial','',8)
|
||||
pdf.Cell(80,5, attachment.filename)
|
||||
pdf.Cell(20,5, human_size(attachment.filesize),0,0,"R")
|
||||
pdf.Cell(20,5, number_to_human_size(attachment.filesize),0,0,"R")
|
||||
pdf.Cell(20,5, format_date(attachment.created_on),0,0,"R")
|
||||
pdf.Cell(70,5, attachment.author.name,0,0,"R")
|
||||
pdf.Ln
|
||||
|
|
|
@ -81,7 +81,7 @@ end %>
|
|||
<table width="100%">
|
||||
<% for attachment in @issue.attachments %>
|
||||
<tr>
|
||||
<td><%= link_to attachment.filename, { :action => 'download', :id => @issue, :attachment_id => attachment }, :class => 'icon icon-attachment' %> (<%= human_size(attachment.filesize) %>)</td>
|
||||
<td><%= link_to attachment.filename, { :action => 'download', :id => @issue, :attachment_id => attachment }, :class => 'icon icon-attachment' %> (<%= number_to_human_size(attachment.filesize) %>)</td>
|
||||
<td><%= format_date(attachment.created_on) %></td>
|
||||
<td><%= attachment.author.display_name %></td>
|
||||
<td><div class="contextual"><%= 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' %></div></td>
|
||||
|
@ -93,7 +93,7 @@ end %>
|
|||
<% form_tag ({ :controller => 'issues', :action => 'add_attachment', :id => @issue }, :multipart => true, :class => "tabular") do %>
|
||||
<p id="attachments_p"><label><%=l(:label_attachment_new)%>
|
||||
<%= image_to_function "add.png", "addFileField();return false" %></label>
|
||||
<%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
|
||||
<%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
|
||||
<%= submit_tag l(:button_add) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<div class="box">
|
||||
<p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
|
||||
<%= image_to_function "add.png", "addFileField();return false" %></label>
|
||||
<%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
|
||||
<%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
|
||||
</div>
|
||||
|
||||
<%= submit_tag l(:button_create) %>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
|
||||
<%= image_to_function "add.png", "addFileField();return false" %></label>
|
||||
<%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
|
||||
<%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
|
||||
</div>
|
||||
<%= submit_tag l(:button_add) %>
|
||||
<% end %>
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
<p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
|
||||
<%= image_to_function "add.png", "addFileField();return false" %></label>
|
||||
<%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
|
||||
<%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
|
||||
|
||||
</div>
|
||||
<!--[eoform:issue]-->
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<td></td>
|
||||
<td><%= link_to file.filename, :controller => 'versions', :action => 'download', :id => version, :attachment_id => file %></td>
|
||||
<td align="center"><%= format_date(file.created_on) %></td>
|
||||
<td align="center"><%= human_size(file.filesize) %></td>
|
||||
<td align="center"><%= number_to_human_size(file.filesize) %></td>
|
||||
<td align="center"><%= file.downloads %></td>
|
||||
<td align="center"><small><%= file.digest %></small></td>
|
||||
<% if delete_allowed %>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
@entries.each do |entry| %>
|
||||
<tr class="<%= cycle 'odd', 'even' %>">
|
||||
<td><%= 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')) %></td>
|
||||
<td align="right"><%= human_size(entry.size) unless entry.is_dir? %></td>
|
||||
<td align="right"><%= number_to_human_size(entry.size) unless entry.is_dir? %></td>
|
||||
<td align="right"><%= link_to entry.lastrev.identifier, :action => 'revision', :id => @project, :rev => entry.lastrev.identifier %></td>
|
||||
<td align="center"><em><%=h entry.lastrev.author %></em></td>
|
||||
<td align="center"><%= format_time(entry.lastrev.time) %></td>
|
||||
|
@ -20,4 +20,4 @@
|
|||
end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="textright"><em><%= l(:label_total) %>: <%= human_size(total_size) %></em></p>
|
||||
<p class="textright"><em><%= l(:label_total) %>: <%= number_to_human_size(total_size) %></em></p>
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<% if @entry.is_file? %>
|
||||
<h3><%=h @entry.name %></h3>
|
||||
<p><%= link_to 'Download', {:action => 'entry', :id => @project, :path => @path, :rev => @rev, :format => 'raw' }, :class => "icon file" %> (<%= human_size @entry.size %>)</p>
|
||||
<p><%= link_to 'Download', {:action => 'entry', :id => @project, :path => @path, :rev => @rev, :format => 'raw' }, :class => "icon file" %> (<%= number_to_human_size @entry.size %>)</p>
|
||||
<% end %>
|
||||
|
||||
<h3>Revisions</h3>
|
||||
|
|
Loading…
Reference in New Issue