changeset 962:f8985bd5d0d6 live

Merge from branch "feature_523"
author Chris Cannam
date Tue, 16 Oct 2012 16:28:50 +0100
parents 352539ac7b43 (current diff) 5251072c02b6 (diff)
children e89e425134ae
files
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/app/views/attachments/_links.html.erb	Tue Oct 16 15:36:12 2012 +0100
+++ b/app/views/attachments/_links.html.erb	Tue Oct 16 16:28:50 2012 +0100
@@ -2,7 +2,7 @@
 <% for attachment in attachments %>
 <p><%= link_to_attachment attachment, :class => 'icon icon-attachment' -%>
 <%= h(" - #{attachment.description}") unless attachment.description.blank? %>
-  <span class="size">(<%= number_to_human_size attachment.filesize %>)</span>
+  <span class="size">(<%= number_to_human_size attachment.filesize %><%= ", " + l(:label_x_downloads, :count => attachment.downloads) unless attachment.downloads == 0 %>)</span>
   <% if options[:deletable] %>
     <%= link_to image_tag('delete.png'), attachment_path(attachment),
                                          :confirm => l(:text_are_you_sure),
--- a/config/locales/en.yml	Tue Oct 16 15:36:12 2012 +0100
+++ b/config/locales/en.yml	Tue Oct 16 16:28:50 2012 +0100
@@ -487,6 +487,10 @@
     zero:  no projects
     one:   1 project
     other: "%{count} projects"
+  label_x_downloads:
+    zero:  never downloaded
+    one:   downloaded once
+    other: "downloaded %{count} times"
   label_project_all: All Projects
   label_project_latest: Latest projects
   label_projects_more: More projects