Feature #13429 » attachment_thumbnails_in_issue_history.diff
app/views/issues/_history.html.erb (working copy) | ||
---|---|---|
13 | 13 |
<li><%= string %></li> |
14 | 14 |
<% end %> |
15 | 15 |
</ul> |
16 |
<% if Setting.thumbnails_enabled? %> |
|
17 |
<% 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? } %> |
|
18 |
<% if thumbnail_attachments.any? %> |
|
19 |
<div class="thumbnails"> |
|
20 |
<% thumbnail_attachments.each do |attachment| %> |
|
21 |
<div><%= thumbnail_tag(attachment) %></div> |
|
22 |
<% end %> |
|
23 |
</div> |
|
24 |
<% end %> |
|
16 | 25 |
<% end %> |
26 |
<% end %> |
|
17 | 27 |
<%= render_notes(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %> |
18 | 28 |
</div> |
19 | 29 |
</div> |
public/stylesheets/application.css (working copy) | ||
---|---|---|
590 | 590 | |
591 | 591 |
div.thumbnails {margin-top:0.6em;} |
592 | 592 |
div.thumbnails div {background:#fff;border:2px solid #ddd;display:inline-block;margin-right:2px;} |
593 |
div.thumbnails img {margin: 3px;} |
|
593 |
div.thumbnails img {margin: 3px; vertical-align: middle;} |
|
594 |
#history div.thumbnails {margin-left: 2em;} |
|
594 | 595 | |
595 | 596 |
p.other-formats { text-align: right; font-size:0.9em; color: #666; } |
596 | 597 |
.other-formats span + span:before { content: "| "; } |