mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: custom html and text can be added to summary emails
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
<table style="border: 20px solid #eee;" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<%- if I18n.t('user_notifications.digest.custom.html.header').present? %>
|
||||
<td style="padding: 10px 10px;">
|
||||
<%= raw(t 'user_notifications.digest.custom.html.header') %>
|
||||
</td>
|
||||
<%- else %>
|
||||
<td style="padding: 10px 10px; background-color: #<%= @header_color %>;">
|
||||
<a href="<%= Discourse.base_url %>" style='color: #<%= @anchor_color %>'>
|
||||
<%- if logo_url.blank? %>
|
||||
@@ -9,6 +14,7 @@
|
||||
<%- end %>
|
||||
</a>
|
||||
</td>
|
||||
<%- end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color: #fff; padding: 10px 10px; font-family: Arial, Helvetica, sans-serif; font-size: 14px;">
|
||||
@@ -32,11 +38,15 @@
|
||||
</div>
|
||||
<%- end %>
|
||||
|
||||
<%= digest_custom_html("below_post_#{i+1}") %>
|
||||
|
||||
<%- if i < @featured_topics.size - 1 %><% end %>
|
||||
|
||||
<%- end %>
|
||||
<%- end %>
|
||||
|
||||
<%= digest_custom_html("above_popular_topics") %>
|
||||
|
||||
<%- if @new_topics.present? %>
|
||||
<hr/>
|
||||
<h3><%=t 'user_notifications.digest.other_new_topics' %></h3>
|
||||
@@ -53,6 +63,8 @@
|
||||
|
||||
<%- end -%>
|
||||
|
||||
<%= digest_custom_html("below_popular_topics") %>
|
||||
|
||||
<%- if @new_topics_since_seen > 0 %>
|
||||
<%- if @new_by_category.present? %>
|
||||
<p><%= t('user_notifications.digest.more_topics_category', last_seen_at: @last_seen_at, new_topics_since_seen: @new_topics_since_seen) %></p>
|
||||
@@ -71,8 +83,12 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<%= digest_custom_html("above_footer") %>
|
||||
|
||||
<div class='footer'>
|
||||
<%=raw(t 'user_notifications.digest.unsubscribe',
|
||||
site_link: html_site_link(@anchor_color),
|
||||
unsubscribe_link: link_to(t('user_notifications.digest.click_here'), email_unsubscribe_url(host: Discourse.base_url_no_prefix, key: @unsubscribe_key), {:style=>"color: ##{@anchor_color}"})) %>
|
||||
</div>
|
||||
|
||||
<%= digest_custom_html("below_footer") %>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<%- if @featured_topics.present? %>
|
||||
### <%=t 'user_notifications.digest.top_topics' %>
|
||||
|
||||
<%- @featured_topics.each do |t| %>
|
||||
<%- @featured_topics.each_with_index do |t,i| %>
|
||||
<%= raw(@markdown_linker.create(t.title, t.relative_url)) %>
|
||||
|
||||
<%- if t.best_post.present? %>
|
||||
@@ -14,10 +14,10 @@
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
<%- end %>
|
||||
|
||||
<%= digest_custom_text("below_post_#{i+1}") %>
|
||||
<%- end %>
|
||||
<%- end %>
|
||||
|
||||
<%= digest_custom_text("above_popular_topics") %>
|
||||
<%- if @new_topics.present? %>
|
||||
**<%=t 'user_notifications.digest.other_new_topics' %>**
|
||||
|
||||
@@ -27,12 +27,15 @@
|
||||
|
||||
<%- end -%>
|
||||
|
||||
|
||||
<%= digest_custom_text("below_popular_topics") %>
|
||||
|
||||
<%= raw(@markdown_linker.references) %>
|
||||
|
||||
<%= digest_custom_text("above_footer") %>
|
||||
<%=raw(t :'user_notifications.digest.unsubscribe',
|
||||
site_link: site_link,
|
||||
unsubscribe_link: raw(@markdown_linker.create(t('user_notifications.digest.click_here'), email_unsubscribe_url(key: @unsubscribe_key, only_path: true)))) %>
|
||||
|
||||
<%= raw(@markdown_linker.references) %>
|
||||
|
||||
<%= digest_custom_text("below_footer") %>
|
||||
Reference in New Issue
Block a user