commit 6be219a9f21b0d72613184cc440f908b6a165101 Author: Jan Schulz-Hofen Date: Mon Mar 11 14:47:26 2013 +0100 include attachment thumbnails in issue history diff --git a/app/views/issues/_history.html.erb b/app/views/issues/_history.html.erb index aea0d1e..c11fa3f 100644 --- a/app/views/issues/_history.html.erb +++ b/app/views/issues/_history.html.erb @@ -12,6 +12,16 @@
  • <%= string %>
  • <% end %> + <% if Setting.thumbnails_enabled? %> + <% thumbnail_attachments = journal.details.map{|d| d.property == 'attachment' and !d.value.blank? and Attachment.find_by_id(d.prop_key)}.select{|a| a and a.thumbnailable? } %> + <% if thumbnail_attachments.any? %> +
    + <% thumbnail_attachments.each do |attachment| %> +
    <%= thumbnail_tag(attachment) %>
    + <% end %> +
    + <% end %> + <% end %> <% end %> <%= render_notes(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %> diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 86ff752..c2aaae4 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -527,6 +527,7 @@ div.attachments span.author { font-size: 0.9em; color: #888; } div.thumbnails {margin-top:0.6em;} div.thumbnails div {background:#fff;border:2px solid #ddd;display:inline-block;margin-right:2px;} div.thumbnails img {margin: 3px;} +#history div.thumbnails {margin-left: 2em;} p.other-formats { text-align: right; font-size:0.9em; color: #666; } .other-formats span + span:before { content: "| "; }