mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 20:02:46 +08:00
feffe23cc5
* Rearrange frontend to account for mailing list mode * Allow update of user preference for mailing list frequency * Add mailing list frequency estimate * Simplify frequency estimate; disable activity summary for mailing list mode * Remove combined updates * Add specs for enqueue mailing list mode job * Write mailing list method for mailer * Fix linting error * Account for stale topics * Add translations for default mailing list setting * One query for mailing list topics * Fix failing spec * WIP * Flesh out html template * First pass at text-based mailing list summary * Add user avatar * Properly format posts for mailing list * Move make_all_links_absolute into Email::Styles * Apply first_seen_at to user * Send mailing list email summary hourly based on first_seen_at * Branch and test cleanup * Use existing mailing list mode estimate * Fix failing specs
32 lines
1.1 KiB
Plaintext
32 lines
1.1 KiB
Plaintext
<%- site_link = raw(@markdown_linker.create(@site_name, '/')) %>
|
|
<%= raw(t 'user_notifications.mailing_list.why', site_link: site_link, date: @since_formatted) %>
|
|
|
|
<%- if @new_topic_posts.keys.present? -%>
|
|
### <%= t 'user_notifications.mailing_list.new_topics' %>
|
|
<%- @new_topic_posts.keys.each do |topic| %>
|
|
<%= raw(@markdown_linker.create(topic.title, topic.relative_url)) %>
|
|
<%- end -%>
|
|
<%- end -%>
|
|
|
|
<%- if @existing_topic_posts.keys.present? -%>
|
|
### <%= t 'user_notifications.mailing_list.new_topics' %>
|
|
<%- @existing_topic_posts.keys.each do |topic| -%>
|
|
<%= raw(@markdown_linker.create(topic.title, topic.relative_url)) %>
|
|
<%= @existing_topic_posts[topic].length %>
|
|
<%- end -%>
|
|
<%- end -%>
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
<%- @posts_by_topic.keys.each do |topic| %>
|
|
### <%= raw(@markdown_linker.create(topic.title, topic.relative_url)) %>
|
|
|
|
<%- @posts_by_topic[topic].each do |post| -%>
|
|
<%= post.user.name || post.user.username %> - <%= post.created_at %>
|
|
--------------------------------------------------------------------------------
|
|
<%= post.raw %>
|
|
|
|
|
|
<%- end -%>
|
|
<%- end %>
|