changeset 961:5251072c02b6 feature_523

Merge from branch cannam
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Tue, 16 Oct 2012 16:27:43 +0100
parents c09e40c4a410 (diff) 910830dc222a (current diff)
children f8985bd5d0d6 3c5858c5794d
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:37:03 2012 +0100
+++ b/app/views/attachments/_links.html.erb	Tue Oct 16 16:27:43 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:37:03 2012 +0100
+++ b/config/locales/en.yml	Tue Oct 16 16:27:43 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