diff --git a/app/views/admin/e_paper_criterias/emailer.html.erb b/app/views/admin/e_paper_criterias/emailer.html.erb index 28cfca3..0290fd3 100644 --- a/app/views/admin/e_paper_criterias/emailer.html.erb +++ b/app/views/admin/e_paper_criterias/emailer.html.erb @@ -162,10 +162,19 @@ } +<% + have_papaers = papers_data.present? + if paper.image.present? + img_src = siteurl + "/" + paper.image.url + else + img_src = nil + end +%>
- <% if paper.image.present? %> - " alt="<%= paper.title %>" /> + <% if have_papaers %> + <% if img_src %> + <%= paper.title %> <% end %>
@@ -181,10 +190,8 @@ <%= t('e_paper.description') %>: - <% if papers_data.present? %> - <%= paper.description.html_safe %> -
- <% end %> + <%= paper.description.html_safe %> +
<%= paper.content.html_safe %>
@@ -208,6 +215,21 @@ <% end %> <% end %>
+ <% else %> + <% if img_src %> + <%= paper.title %> + <% end %> +
+ +
+ <%= paper.content.html_safe %> +
+
+ <% end %>