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