about summary refs log tree commit diff
path: root/app/views/admin_mailer/_new_trending_links.text.erb
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-02-26 21:15:19 +0100
committerGitHub <noreply@github.com>2022-02-26 21:15:19 +0100
commit551820cbd9e5beebd16f16205143e2263d4f2d51 (patch)
tree6868722efeb660c0031a22aecfdc4b2c5bc9dcc6 /app/views/admin_mailer/_new_trending_links.text.erb
parente48eaf64cc7cb0cfab388331c4823ee5fb580d59 (diff)
parent67c6f37e269a4ebb538e019351f894183f3c1439 (diff)
Merge pull request #1704 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/views/admin_mailer/_new_trending_links.text.erb')
-rw-r--r--app/views/admin_mailer/_new_trending_links.text.erb14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/views/admin_mailer/_new_trending_links.text.erb b/app/views/admin_mailer/_new_trending_links.text.erb
new file mode 100644
index 000000000..405926fdd
--- /dev/null
+++ b/app/views/admin_mailer/_new_trending_links.text.erb
@@ -0,0 +1,14 @@
+<%= raw t('admin_mailer.new_trends.new_trending_links.title') %>
+
+<% @links.each do |link| %>
+- <%= link.title %> • <%= link.url %>
+  <%= raw t('admin.trends.links.usage_comparison', today: link.history.get(Time.now.utc).accounts, yesterday: link.history.get(Time.now.utc - 1.day).accounts) %> • <%= t('admin.trends.tags.current_score', score: Trends.links.score(link.id).round(2)) %>
+<% end %>
+
+<% if @lowest_trending_link %>
+<%= raw t('admin_mailer.new_trends.new_trending_links.requirements', lowest_link_title: @lowest_trending_link.title, lowest_link_score: Trends.links.score(@lowest_trending_link.id).round(2), rank: Trends.links.options[:review_threshold]) %>
+<% else %>
+<%= raw t('admin_mailer.new_trends.new_trending_links.no_approved_links') %>
+<% end %>
+
+<%= raw t('application_mailer.view')%> <%= admin_trends_links_url %>