2014-11-13 15:44:48 -06:00
|
|
|
<table style="border: 20px solid #eee;" cellspacing="0" cellpadding="0">
|
2013-11-28 16:20:56 -06:00
|
|
|
<tr>
|
2016-08-23 15:06:02 -05:00
|
|
|
<%- 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 %>
|
2014-07-17 11:31:37 -05:00
|
|
|
<td style="padding: 10px 10px; background-color: #<%= @header_color %>;">
|
2016-02-12 11:09:29 -06:00
|
|
|
<a href="<%= Discourse.base_url %>" style='color: #<%= @anchor_color %>'>
|
2014-07-21 13:18:32 -05:00
|
|
|
<%- if logo_url.blank? %>
|
|
|
|
<%= SiteSetting.title %>
|
|
|
|
<%- else %>
|
2016-04-15 13:59:46 -05:00
|
|
|
<img src="<%= logo_url %>" style="max-height: 35px; min-height: 35px; height: 35px;" class='site-logo' alt="<%= SiteSetting.title %>">
|
2014-07-21 13:18:32 -05:00
|
|
|
<%- end %>
|
2016-04-02 11:45:34 -05:00
|
|
|
</a>
|
2013-11-28 16:20:56 -06:00
|
|
|
</td>
|
2016-08-23 15:06:02 -05:00
|
|
|
<%- end %>
|
2013-11-28 16:20:56 -06:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td style="background-color: #fff; padding: 10px 10px; font-family: Arial, Helvetica, sans-serif; font-size: 14px;">
|
2016-02-12 11:09:29 -06:00
|
|
|
<%= raw(t 'user_notifications.digest.why', site_link: html_site_link(@anchor_color), last_seen_at: @last_seen_at) %>
|
2013-11-28 16:20:56 -06:00
|
|
|
|
|
|
|
<%- if @featured_topics.present? %>
|
2014-08-22 14:14:50 -05:00
|
|
|
<hr/>
|
2013-11-28 16:20:56 -06:00
|
|
|
<h3><%=t 'user_notifications.digest.top_topics' %></h3>
|
|
|
|
|
2014-08-22 14:14:50 -05:00
|
|
|
|
2013-11-28 16:20:56 -06:00
|
|
|
<%- @featured_topics.each_with_index do |t, i| %>
|
2014-04-17 13:40:30 -05:00
|
|
|
<div class='featured-topic'>
|
2016-04-26 10:18:34 -05:00
|
|
|
<a href='<%= Discourse.base_url_no_prefix + t.relative_url %>' style='color: #<%= @anchor_color %>'><%= raw format_topic_title(t.title) %></a>
|
2014-11-28 02:38:08 -06:00
|
|
|
<br/>
|
2015-05-17 11:38:43 -05:00
|
|
|
<%= category_badge(t.category, inline_style: true, absolute_url: true) %>
|
2014-04-17 13:40:30 -05:00
|
|
|
</div>
|
2013-11-28 16:20:56 -06:00
|
|
|
|
2016-08-19 11:11:21 -05:00
|
|
|
<%- if t.best_post.present? && !t.best_post.user_deleted %>
|
2013-11-28 16:20:56 -06:00
|
|
|
<div class='digest-post'>
|
2014-01-22 11:37:37 -06:00
|
|
|
<%= email_excerpt(t.best_post.cooked, @featured_topics.size) %>
|
2013-11-28 16:20:56 -06:00
|
|
|
</div>
|
|
|
|
<%- end %>
|
|
|
|
|
2016-08-23 15:06:02 -05:00
|
|
|
<%= digest_custom_html("below_post_#{i+1}") %>
|
|
|
|
|
2014-08-20 01:23:13 -05:00
|
|
|
<%- if i < @featured_topics.size - 1 %><% end %>
|
2013-11-28 16:20:56 -06:00
|
|
|
|
|
|
|
<%- end %>
|
|
|
|
<%- end %>
|
|
|
|
|
2016-08-23 15:06:02 -05:00
|
|
|
<%= digest_custom_html("above_popular_topics") %>
|
|
|
|
|
2013-11-28 16:20:56 -06:00
|
|
|
<%- if @new_topics.present? %>
|
2014-08-22 14:14:50 -05:00
|
|
|
<hr/>
|
2013-11-28 16:20:56 -06:00
|
|
|
<h3><%=t 'user_notifications.digest.other_new_topics' %></h3>
|
|
|
|
|
|
|
|
<%- @new_topics.each do |t| %>
|
|
|
|
<ul>
|
2013-11-29 12:00:10 -06:00
|
|
|
<li>
|
2016-04-26 10:18:34 -05:00
|
|
|
<a href='<%= Discourse.base_url_no_prefix + t.relative_url %>' style='color: #<%= @anchor_color %>'><%= raw format_topic_title(t.title) %></a>
|
2015-06-01 01:13:00 -05:00
|
|
|
<span class='post-count'><%= t.posts_count %></span>
|
2015-06-11 08:52:22 -05:00
|
|
|
<%= category_badge(t.category, inline_style: true, absolute_url: true) %>
|
2013-11-29 12:00:10 -06:00
|
|
|
</li>
|
2013-11-28 16:20:56 -06:00
|
|
|
</ul>
|
|
|
|
<%- end -%>
|
|
|
|
|
|
|
|
<%- end -%>
|
|
|
|
|
2016-08-23 15:06:02 -05:00
|
|
|
<%= digest_custom_html("below_popular_topics") %>
|
|
|
|
|
2014-04-17 15:04:26 -05:00
|
|
|
<%- if @new_topics_since_seen > 0 %>
|
2014-04-17 15:42:40 -05:00
|
|
|
<%- 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>
|
|
|
|
<div>
|
2015-08-04 00:35:57 -05:00
|
|
|
<%- @new_by_category.first(10).each do |c| %>
|
2014-11-07 16:16:52 -06:00
|
|
|
<span style='white-space: nowrap'>
|
2016-04-26 10:18:34 -05:00
|
|
|
<a href='<%= Discourse.base_url_no_prefix %><%= c[0].url %>' style='color: #<%= @anchor_color %>'><%= c[0].name %></b> <span style='color: #777; margin: 0 10px 0 5px; font-size: 0.9em;'> <%= c[1] %></span></a>
|
2014-11-07 16:16:52 -06:00
|
|
|
</span>
|
2014-04-17 15:42:40 -05:00
|
|
|
<%- end %>
|
|
|
|
</div>
|
|
|
|
<%- else %>
|
|
|
|
<p><%= t('user_notifications.digest.more_topics', last_seen_at: @last_seen_at, new_topics_since_seen: @new_topics_since_seen) %></p>
|
|
|
|
<%- end %>
|
2014-04-17 15:04:26 -05:00
|
|
|
<%- end -%>
|
2013-11-28 16:20:56 -06:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2014-11-13 15:44:48 -06:00
|
|
|
|
2016-08-23 15:06:02 -05:00
|
|
|
<%= digest_custom_html("above_footer") %>
|
|
|
|
|
2014-11-13 15:44:48 -06:00
|
|
|
<div class='footer'>
|
2016-03-15 12:29:19 -05:00
|
|
|
<%=raw(t 'user_notifications.digest.unsubscribe',
|
2016-02-12 11:09:29 -06:00
|
|
|
site_link: html_site_link(@anchor_color),
|
2016-04-28 11:33:28 -05:00
|
|
|
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}"})) %>
|
2014-11-13 15:44:48 -06:00
|
|
|
</div>
|
2016-08-23 15:06:02 -05:00
|
|
|
|
|
|
|
<%= digest_custom_html("below_footer") %>
|