Add trending statuses (#17431)
* Add trending statuses * Fix dangling items with stale scores in localized sets * Various fixes and improvements - Change approve_all/reject_all to approve_accounts/reject_accounts - Change Trends::Query methods to not mutate the original query - Change Trends::Query#skip to offset - Change follow recommendations to be refreshed in a transaction * Add tests for trending statuses filtering behaviour * Fix not applying filtering scope in controller
This commit is contained in:
parent
a29a982eaa
commit
27965ce5ed
71 changed files with 1074 additions and 307 deletions
14
app/views/admin_mailer/_new_trending_links.text.erb
Normal file
14
app/views/admin_mailer/_new_trending_links.text.erb
Normal file
|
@ -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 %>
|
Loading…
Add table
Add a link
Reference in a new issue