mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 18:13:40 +08:00
55 lines
1.9 KiB
Plaintext
55 lines
1.9 KiB
Plaintext
<table style="border: 1px solid #ddd;" cellspacing="0" cellpadding="0">
|
|
<tr>
|
|
<td style="padding: 10px 10px; background-color: #eee; border: 1px solid #ddd;">
|
|
<a href="<%= Discourse.base_url %>">
|
|
<img src="<%= logo_url %>" style="max-height: 35px; min-height: 35px; height: 35px;" class='site-logo'></a>
|
|
</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| %>
|
|
<div class='featured-topic'>
|
|
<%= link_to t.title, "#{Discourse.base_url}#{t.relative_url}" %>
|
|
<%= email_category(t.category) %>
|
|
</div>
|
|
|
|
<%- if t.best_post.present? %>
|
|
<div class='digest-post'>
|
|
<%= email_excerpt(t.best_post.cooked, @featured_topics.size) %>
|
|
</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>
|
|
<li>
|
|
<%= link_to t.title, "#{Discourse.base_url}#{t.relative_url}" %>
|
|
<span class='post-count'><%= t('user_notifications.digest.posts', count: t.posts_count) %></span>
|
|
<%= email_category(t.category) %>
|
|
</li>
|
|
</ul>
|
|
<%- end -%>
|
|
|
|
<%- end -%>
|
|
|
|
<span class='footer-notice'>
|
|
<%=raw(t :'user_notifications.digest.unsubscribe',
|
|
site_link: html_site_link,
|
|
unsubscribe_link: link_to(t('user_notifications.digest.click_here'), email_unsubscribe_path(host: Discourse.base_url, key: @user.temporary_key, only_path: false))) %>
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
</table>
|