2013-02-06 03:16:51 +08:00
|
|
|
<%- site_link = raw(@markdown_linker.create(@site_name, '/')) %>
|
2024-05-22 16:23:03 +08:00
|
|
|
<%= raw(t 'user_notifications.digest.why', site_link: site_link, since: @since) %>
|
2013-02-06 03:16:51 +08:00
|
|
|
|
2016-11-25 05:28:24 +08:00
|
|
|
<%- @counts.each do |count| -%>
|
|
|
|
<%= count[:value] -%> <%=t count[:label_key] %>
|
|
|
|
<%- end -%>
|
2013-02-06 03:16:51 +08:00
|
|
|
|
2016-11-11 07:16:24 +08:00
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
<%- if @popular_topics.present? %>
|
|
|
|
### <%=t 'user_notifications.digest.popular_topics' %>
|
|
|
|
|
|
|
|
<%- @popular_topics.each_with_index do |t,i| %>
|
2018-08-08 04:38:05 +08:00
|
|
|
<%= raw(@markdown_linker.create(t.title, t.url)) %>
|
2013-06-04 04:12:24 +08:00
|
|
|
|
|
|
|
<%- if t.best_post.present? %>
|
2014-11-06 03:37:00 +08:00
|
|
|
<%= raw(t.best_post.excerpt(1000, strip_links: true, text_entities: true, markdown_images: true)) %>
|
2013-06-04 04:12:24 +08:00
|
|
|
--------------------------------------------------------------------------------
|
2013-02-06 03:16:51 +08:00
|
|
|
|
|
|
|
<%- end %>
|
2016-08-24 04:06:02 +08:00
|
|
|
<%= digest_custom_text("below_post_#{i+1}") %>
|
2013-02-06 03:16:51 +08:00
|
|
|
<%- end %>
|
|
|
|
<%- end %>
|
2016-08-24 04:06:02 +08:00
|
|
|
<%= digest_custom_text("above_popular_topics") %>
|
2013-08-10 02:43:02 +08:00
|
|
|
|
2016-11-11 07:16:24 +08:00
|
|
|
<%- if @popular_posts.present? %>
|
|
|
|
### <%=t 'user_notifications.digest.popular_posts' %>
|
|
|
|
|
|
|
|
<%- @popular_posts.each_with_index do |post,i| %>
|
2018-08-08 04:38:05 +08:00
|
|
|
<%= post.user.username -%> - <%= raw(@markdown_linker.create(post.topic.title, post.topic.url)) %>
|
2016-11-11 07:16:24 +08:00
|
|
|
|
|
|
|
<%= raw(post.excerpt(1000, strip_links: true, text_entities: true, markdown_images: true)) %>
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
<%- end %>
|
|
|
|
<%- end %>
|
2013-08-10 02:43:02 +08:00
|
|
|
|
2016-11-11 07:16:24 +08:00
|
|
|
<%- if @other_new_for_you.present? %>
|
|
|
|
**<%=t 'user_notifications.digest.more_new' %>**
|
|
|
|
|
|
|
|
<%- @other_new_for_you.each do |t| %>
|
2018-08-08 04:38:05 +08:00
|
|
|
* <%= raw(@markdown_linker.create(t.title, t.url)) %> - <%= t.posts_count %> - <%- if t.category %>[<%= t.category.name %>]<%- end %>
|
2013-08-10 02:43:02 +08:00
|
|
|
<%- end -%>
|
2016-11-11 07:16:24 +08:00
|
|
|
<%- end %>
|
2013-08-10 02:43:02 +08:00
|
|
|
|
2016-08-24 04:06:02 +08:00
|
|
|
<%= digest_custom_text("below_popular_topics") %>
|
2013-08-10 02:43:02 +08:00
|
|
|
|
2013-02-06 03:16:51 +08:00
|
|
|
<%= raw(@markdown_linker.references) %>
|
|
|
|
|
2016-08-24 04:06:02 +08:00
|
|
|
<%= digest_custom_text("above_footer") %>
|
2013-11-29 06:20:56 +08:00
|
|
|
<%=raw(t :'user_notifications.digest.unsubscribe',
|
2013-02-06 03:16:51 +08:00
|
|
|
site_link: site_link,
|
2017-10-31 03:36:23 +08:00
|
|
|
email_preferences_link: raw(@markdown_linker.create(t('user_notifications.digest.your_email_settings'), '/my/preferences/emails')),
|
2018-08-08 04:38:05 +08:00
|
|
|
unsubscribe_link: raw(@markdown_linker.create(t('user_notifications.digest.click_here'), "/email/unsubscribe/#{@unsubscribe_key}"))) %>
|
2013-02-06 03:16:51 +08:00
|
|
|
|
|
|
|
<%= raw(@markdown_linker.references) %>
|
2016-08-24 04:06:02 +08:00
|
|
|
|
2016-11-11 07:16:24 +08:00
|
|
|
<%= digest_custom_text("below_footer") %>
|