在redmine安装目录\app\views\attachments\_links.html.erb的最后面增加以下内容:
<% images = attachments.select { |a| a.image? } %> <% unless images.empty? %> <div class='images'> <% images.each do |attachment| %> <%= link_to image_tag(url_for({:controller => 'attachments', :action => 'show', :id => attachment, :filename => attachment.filename })), {:controller => 'attachments', :action => 'show', :id => attachment, :filename => attachment.filename }, :class => 'lightbox', :rel => 'attachments', :title => "#{attachment.filename}#{ ('-' + attachment.description) unless attachment.description.blank? }" %> <% end -%> </div> <% end -%>
|