2013-11-28 17:20:56 -05:00
|
|
|
<table style="border: 1px solid #ddd;" cellspacing="0" cellpadding="0">
|
|
|
|
<tr>
|
2014-07-17 12:31:37 -04:00
|
|
|
<td style="padding: 10px 10px; background-color: #<%= @header_color %>;">
|
2013-11-28 17:20:56 -05:00
|
|
|
<a href="<%= Discourse.base_url %>">
|
2014-07-21 14:18:32 -04: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-28 17:20:56 -05: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? %>
|
|
|
|
<h3><%=t 'user_notifications.digest.top_topics' %></h3>
|
|
|
|
|
|
|
|
<%- @featured_topics.each_with_index do |t, i| %>
|
2014-04-17 14:40:30 -04:00
|
|
|
<div class='featured-topic'>
|
|
|
|
<%= link_to t.title, "#{Discourse.base_url}#{t.relative_url}" %>
|
|
|
|
<%= email_category(t.category) %>
|
|
|
|
</div>
|
2013-11-28 17:20:56 -05:00
|
|
|
|
|
|
|
<%- if t.best_post.present? %>
|
|
|
|
<div class='digest-post'>
|
2014-01-22 12:37:37 -05:00
|
|
|
<%= email_excerpt(t.best_post.cooked, @featured_topics.size) %>
|
2013-11-28 17:20:56 -05:00
|
|
|
</div>
|
|
|
|
<%- end %>
|
|
|
|
|
|
|
|
<%- if i < @featured_topics.size - 1 %><hr><% end %>
|
|
|
|
|
|
|
|
<%- end %>
|
|
|
|
<%- end %>
|
|
|
|
|
|
|
|
<%- if @new_topics.present? %>
|
|
|
|
<h3><%=t 'user_notifications.digest.other_new_topics' %></h3>
|
|
|
|
|
|
|
|
<%- @new_topics.each do |t| %>
|
|
|
|
<ul>
|
2013-11-29 13:00:10 -05:00
|
|
|
<li>
|
2013-11-29 17:10:54 -05:00
|
|
|
<%= link_to t.title, "#{Discourse.base_url}#{t.relative_url}" %>
|
2013-11-29 13:00:10 -05:00
|
|
|
<span class='post-count'><%= t('user_notifications.digest.posts', count: t.posts_count) %></span>
|
2014-04-17 14:40:30 -04:00
|
|
|
<%= email_category(t.category) %>
|
2013-11-29 13:00:10 -05:00
|
|
|
</li>
|
2013-11-28 17:20:56 -05:00
|
|
|
</ul>
|
|
|
|
<%- end -%>
|
|
|
|
|
|
|
|
<%- end -%>
|
|
|
|
|
2014-04-17 16:04:26 -04:00
|
|
|
<%- if @new_topics_since_seen > 0 %>
|
2014-04-17 16:42:40 -04: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>
|
|
|
|
<%- @new_by_category.each do |c| %>
|
|
|
|
<span style="margin-bottom: 8px; margin-right: 10px; display: inline-block;"><%= email_category(c[0], show_uncategorized: true) %> x <%= c[1] %></span>
|
|
|
|
<%- 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 16:04:26 -04:00
|
|
|
<%- end -%>
|
|
|
|
|
2013-11-28 17:20:56 -05:00
|
|
|
<span class='footer-notice'>
|
|
|
|
<%=raw(t :'user_notifications.digest.unsubscribe',
|
|
|
|
site_link: html_site_link,
|
2013-11-29 17:10:54 -05:00
|
|
|
unsubscribe_link: link_to(t('user_notifications.digest.click_here'), email_unsubscribe_path(host: Discourse.base_url, key: @user.temporary_key, only_path: false))) %>
|
2013-11-28 17:20:56 -05:00
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|