From 2e25d70d92a5186b8f659e20fc7e82c3f16d1281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E5=8D=9A=E4=BA=9E?= Date: Wed, 11 Sep 2024 13:17:38 +0800 Subject: [PATCH] Fix topic_img_url. --- app/views/admin/e_paper_criterias/emailer.html.erb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/views/admin/e_paper_criterias/emailer.html.erb b/app/views/admin/e_paper_criterias/emailer.html.erb index 0c52fdd..2ff68ed 100644 --- a/app/views/admin/e_paper_criterias/emailer.html.erb +++ b/app/views/admin/e_paper_criterias/emailer.html.erb @@ -230,9 +230,18 @@ <% topics = (papers_data_hash["topic_ids"].nil? ? papers_data_hash["topics"] : EPaperTopic.where(:id.in=>papers_data_hash["topic_ids"]).to_a) %> <% topics.each do |topic| %>
+ <% + if topic.image.present? + topic_img_url = siteurl + topic.image.thumb.url + else + topic_img_url = nil + end + %> " target="_blank"><%= topic.title %>
- + <% if topic_img_url %> + + <% end %>
<%= fix_local_url(siteurl, topic.description) %>