##// END OF EJS Templates
replaced deprecated human_size by number_to_human_size...
Jean-Philippe Lang -
r182:0d55613359d9
parent child
Show More
@@ -18,7 +18,7
18 18 <%= 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' %>
19 19 </div>
20 20 <%= link_to attachment.filename, :action => 'download', :id => @document, :attachment_id => attachment %>
21 (<%= human_size attachment.filesize %>)<br />
21 (<%= number_to_human_size attachment.filesize %>)<br />
22 22 <em><%= attachment.author.display_name %>, <%= format_date(attachment.created_on) %></em><br />
23 23 <%= lwr(:label_download, attachment.downloads) %>
24 24 </li>
@@ -31,7 +31,7
31 31 <% form_tag ({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :class => "tabular") do %>
32 32 <p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
33 33 <%= image_to_function "add.png", "addFileField();return false" %></label>
34 <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
34 <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
35 35 <%= submit_tag l(:button_add) %>
36 36 <% end %>
37 37 <% end %>
@@ -92,7 +92,7
92 92 for attachment in issue.attachments
93 93 pdf.SetFont('Arial','',8)
94 94 pdf.Cell(80,5, attachment.filename)
95 pdf.Cell(20,5, human_size(attachment.filesize),0,0,"R")
95 pdf.Cell(20,5, number_to_human_size(attachment.filesize),0,0,"R")
96 96 pdf.Cell(20,5, format_date(attachment.created_on),0,0,"R")
97 97 pdf.Cell(70,5, attachment.author.name,0,0,"R")
98 98 pdf.Ln
@@ -81,7 +81,7 end %>
81 81 <table width="100%">
82 82 <% for attachment in @issue.attachments %>
83 83 <tr>
84 <td><%= link_to attachment.filename, { :action => 'download', :id => @issue, :attachment_id => attachment }, :class => 'icon icon-attachment' %> (<%= human_size(attachment.filesize) %>)</td>
84 <td><%= link_to attachment.filename, { :action => 'download', :id => @issue, :attachment_id => attachment }, :class => 'icon icon-attachment' %> (<%= number_to_human_size(attachment.filesize) %>)</td>
85 85 <td><%= format_date(attachment.created_on) %></td>
86 86 <td><%= attachment.author.display_name %></td>
87 87 <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 %>
93 93 <% form_tag ({ :controller => 'issues', :action => 'add_attachment', :id => @issue }, :multipart => true, :class => "tabular") do %>
94 94 <p id="attachments_p"><label><%=l(:label_attachment_new)%>
95 95 <%= image_to_function "add.png", "addFileField();return false" %></label>
96 <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
96 <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
97 97 <%= submit_tag l(:button_add) %>
98 98 <% end %>
99 99 <% end %>
@@ -6,7 +6,7
6 6 <div class="box">
7 7 <p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
8 8 <%= image_to_function "add.png", "addFileField();return false" %></label>
9 <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
9 <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
10 10 </div>
11 11
12 12 <%= submit_tag l(:button_create) %>
@@ -9,7 +9,7
9 9
10 10 <p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
11 11 <%= image_to_function "add.png", "addFileField();return false" %></label>
12 <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
12 <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
13 13 </div>
14 14 <%= submit_tag l(:button_add) %>
15 15 <% end %> No newline at end of file
@@ -27,7 +27,7
27 27
28 28 <p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%>
29 29 <%= image_to_function "add.png", "addFileField();return false" %></label>
30 <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
30 <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
31 31
32 32 </div>
33 33 <!--[eoform:issue]-->
@@ -25,7 +25,7
25 25 <td></td>
26 26 <td><%= link_to file.filename, :controller => 'versions', :action => 'download', :id => version, :attachment_id => file %></td>
27 27 <td align="center"><%= format_date(file.created_on) %></td>
28 <td align="center"><%= human_size(file.filesize) %></td>
28 <td align="center"><%= number_to_human_size(file.filesize) %></td>
29 29 <td align="center"><%= file.downloads %></td>
30 30 <td align="center"><small><%= file.digest %></small></td>
31 31 <% if delete_allowed %>
@@ -11,7 +11,7
11 11 @entries.each do |entry| %>
12 12 <tr class="<%= cycle 'odd', 'even' %>">
13 13 <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>
14 <td align="right"><%= human_size(entry.size) unless entry.is_dir? %></td>
14 <td align="right"><%= number_to_human_size(entry.size) unless entry.is_dir? %></td>
15 15 <td align="right"><%= link_to entry.lastrev.identifier, :action => 'revision', :id => @project, :rev => entry.lastrev.identifier %></td>
16 16 <td align="center"><em><%=h entry.lastrev.author %></em></td>
17 17 <td align="center"><%= format_time(entry.lastrev.time) %></td>
@@ -20,4 +20,4
20 20 end %>
21 21 </tbody>
22 22 </table>
23 <p class="textright"><em><%= l(:label_total) %>: <%= human_size(total_size) %></em></p> No newline at end of file
23 <p class="textright"><em><%= l(:label_total) %>: <%= number_to_human_size(total_size) %></em></p> No newline at end of file
@@ -9,7 +9,7
9 9
10 10 <% if @entry.is_file? %>
11 11 <h3><%=h @entry.name %></h3>
12 <p><%= link_to 'Download', {:action => 'entry', :id => @project, :path => @path, :rev => @rev, :format => 'raw' }, :class => "icon file" %> (<%= human_size @entry.size %>)</p>
12 <p><%= link_to 'Download', {:action => 'entry', :id => @project, :path => @path, :rev => @rev, :format => 'raw' }, :class => "icon file" %> (<%= number_to_human_size @entry.size %>)</p>
13 13 <% end %>
14 14
15 15 <h3>Revisions</h3>
General Comments 0
You need to be logged in to leave comments. Login now