##// END OF EJS Templates
Show the most recent file when displaying an inline image....
Jean-Philippe Lang -
r1937:58fbf5e66f3b
parent child
Show More
@@ -241,6 +241,7 module ApplicationHelper
241 attachments = options[:attachments] || (obj && obj.respond_to?(:attachments) ? obj.attachments : nil)
241 attachments = options[:attachments] || (obj && obj.respond_to?(:attachments) ? obj.attachments : nil)
242
242
243 if attachments
243 if attachments
244 attachments = attachments.sort_by(&:created_on).reverse
244 text = text.gsub(/!((\<|\=|\>)?(\([^\)]+\))?(\[[^\]]+\])?(\{[^\}]+\})?)(\S+\.(gif|jpg|jpeg|png))!/) do |m|
245 text = text.gsub(/!((\<|\=|\>)?(\([^\)]+\))?(\[[^\]]+\])?(\{[^\}]+\})?)(\S+\.(gif|jpg|jpeg|png))!/) do |m|
245 style = $1
246 style = $1
246 filename = $6
247 filename = $6
General Comments 0
You need to be logged in to leave comments. Login now