请教一下关于 redmine 自动加载附件图片的问题

2018-08-08 15:07:51 +08:00
 xxy023

版本 redmine3.4.6,系统 windows server 8

在网上搜到是在 apps\redmine\htdocs\app\views\attachments_links.html.erb 文件下加以下代码块,但是重启 redmine 之后图片预览失败,请问有人知道怎么解决吗?

<% images = attachments.select { |a| a.image? } %>

<% unless images.empty? %>

<% 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 -%>
<% end -%>
1257 次点击
所在节点    程序员
1 条回复
xxy023
2018-08-10 15:20:22 +08:00
放弃了改源码,装了插件解决了需求

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/477963

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX