Break down new topic counts by category if a digest contains many.

This commit is contained in:
Robin Ward
2014-04-17 16:42:40 -04:00
parent 0e56157212
commit 64faee0935
7 changed files with 57 additions and 16 deletions

View File

@@ -45,7 +45,16 @@
<%- end -%>
<%- if @new_topics_since_seen > 0 %>
<p><%= t('user_notifications.digest.more_topics', last_seen_at: @last_seen_at, new_topics_since_seen: @new_topics_since_seen) %></p>
<%- 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 %>
<%- end -%>
<span class='footer-notice'>