changeset 965:4018f255c97b cannam

Merge from branch "feature_523"
author Chris Cannam
date Tue, 16 Oct 2012 16:47:33 +0100
parents a9f1192c9c79 (current diff) 3c5858c5794d (diff)
children e632838adb35
files
diffstat 3 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/app/views/attachments/_links.html.erb	Tue Oct 16 16:29:01 2012 +0100
+++ b/app/views/attachments/_links.html.erb	Tue Oct 16 16:47:33 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_and_count"><%= 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 16:29:01 2012 +0100
+++ b/config/locales/en.yml	Tue Oct 16 16:47:33 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
--- a/public/stylesheets/application.css	Tue Oct 16 16:29:01 2012 +0100
+++ b/public/stylesheets/application.css	Tue Oct 16 16:47:33 2012 +0100
@@ -506,7 +506,8 @@
 div.attachments { margin-top: 12px; }
 div.attachments p { margin:4px 0 2px 0; }
 div.attachments img { vertical-align: middle; }
-div.attachments span.author { font-size: 0.9em; color: #888; }
+div.attachments span.author { font-size: 0.9em; color: #888; font-style: italic; padding-left: 4px }
+div.attachments span.size_and_count { font-size: 0.9em; color: #888; padding-left: 4px; }
 
 p.other-formats { text-align: right; font-size:0.9em; color: #666; }
 .other-formats span + span:before { content: "| "; }