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