Feature #13429 » attachment_thumbnails_in_issue_history-20151007.diff
| app/views/issues/_history.html.erb (working copy) | ||
|---|---|---|
|
<li><%= string %></li>
|
||
|
<% end %>
|
||
|
</ul>
|
||
|
<% if Setting.thumbnails_enabled? %>
|
||
|
<% thumbnail_attachments = journal.details.map{|d| d.property == 'attachment' && d.value.present? && Attachment.find_by_id(d.prop_key)}.select{|a| a.try(:thumbnailable?)} %>
|
||
|
<% if thumbnail_attachments.any? %>
|
||
|
<div class="thumbnails">
|
||
|
<% thumbnail_attachments.each do |attachment| %>
|
||
|
<div><%= thumbnail_tag(attachment) %></div>
|
||
|
<% end %>
|
||
|
</div>
|
||
|
<% end %>
|
||
|
<% end %>
|
||
|
<% end %>
|
||
|
<%= render_notes(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %>
|
||
|
</div>
|
||
|
</div>
|
||
| public/stylesheets/application.css (working copy) | ||
|---|---|---|
|
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;}
|
||
|
div.thumbnails img {margin: 3px; vertical-align: middle;}
|
||
|
#history div.thumbnails {margin-left: 2em;}
|
||
|
p.other-formats { text-align: right; font-size:0.9em; color: #666; }
|
||
|
.other-formats span + span:before { content: "| "; }
|
||
- « Previous
- 1
- 2
- 3
- 4
- Next »