summaryrefslogtreecommitdiffstats
path: root/app/views/attachments
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-07-07 13:48:07 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-07-07 13:48:07 +0000
commita0c495b953b84d90f5c87f089eaefbf310b9dfeb (patch)
tree80206825ef5f1674b9330aa2688e3bb0d3c48f24 /app/views/attachments
parentb0bd50620195b19dcc1b7f2f82de73fceaa13692 (diff)
downloadredmine-a0c495b953b84d90f5c87f089eaefbf310b9dfeb.tar.gz
redmine-a0c495b953b84d90f5c87f089eaefbf310b9dfeb.zip
Displays thumbnails of attached images of the issue view (#1006).
This behaviour can be turned on/off in Settings -> Display (off by default). Thumbnail size can be configured there too. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9933 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/attachments')
-rw-r--r--app/views/attachments/_links.html.erb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/views/attachments/_links.html.erb b/app/views/attachments/_links.html.erb
index 779702fb7..f77cfb1eb 100644
--- a/app/views/attachments/_links.html.erb
+++ b/app/views/attachments/_links.html.erb
@@ -20,4 +20,14 @@
<% end %>
</p>
<% end %>
+<% if defined?(thumbnails) && thumbnails %>
+ <% images = attachments.select(&:thumbnailable?) %>
+ <% if images.any? %>
+ <div class="thumbnails">
+ <% images.each do |attachment| %>
+ <div><%= thumbnail_tag(attachment) %></div>
+ <% end %>
+ </div>
+ <% end %>
+<% end %>
</div>