mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 09:26:54 -06:00
4b9d35cd0e
Enable the new setting "post excerpts in emails" to send excerpts instead of complete posts in notification emails. Control the length of excerpts with the "post excerpt maxlength" setting.
44 lines
1.7 KiB
Plaintext
44 lines
1.7 KiB
Plaintext
<div id='main' class=<%= classes %>>
|
|
|
|
<div class='header-instructions'>%{header_instructions}</div>
|
|
|
|
<%- if SiteSetting.private_email? %>
|
|
<p><%= t('system_messages.contents_hidden') %></p>
|
|
<% else %>
|
|
<%= render partial: 'email/post', locals: { post: post, use_excerpt: SiteSetting.post_excerpts_in_emails } %>
|
|
|
|
<% if in_reply_to_post.present? || context_posts.present? %>
|
|
<div class='footer'>%{respond_instructions}</div>
|
|
<hr>
|
|
<% end %>
|
|
|
|
<% if in_reply_to_post.present? %>
|
|
<h4 class='previous-discussion'><%= t "user_notifications.in_reply_to" %></h4>
|
|
<%= render partial: 'email/post', locals: { post: in_reply_to_post, use_excerpt: true} %>
|
|
<% end %>
|
|
|
|
<% if context_posts.present? %>
|
|
<h4 class='previous-discussion'><%= t "user_notifications.previous_discussion" %></h4>
|
|
<% context_posts.each do |p| %>
|
|
<%= render partial: 'email/post', locals: { post: p, use_excerpt: false } %>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<% if reached_limit %>
|
|
<hr>
|
|
<div class='footer'><%= t "user_notifications.reached_limit", count: SiteSetting.max_emails_per_day_per_user %></div>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<div class='footer undecorated-link-footer <%= first_footer_classes %>'>%{respond_instructions}</div>
|
|
<div class='footer'>%{unsubscribe_instructions}</div>
|
|
|
|
</div>
|
|
|
|
<div itemscope itemtype="http://schema.org/EmailMessage" style="display:none">
|
|
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
|
|
<link itemprop="url" href="<%= Discourse.base_url %><%= post.url(without_slug: SiteSetting.private_email?) %>" />
|
|
<meta itemprop="name" content="<%= t 'read_full_topic' %>"/>
|
|
</div>
|
|
</div>
|