diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2022-10-08 16:45:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-08 16:45:40 +0200 |
commit | 45ebdb72ca1678eb30e6087f61bd019c7ea903f4 (patch) | |
tree | 39fa4a3185bf358efa8c954a42b39b927d3b904b /app/views/admin/trends/links | |
parent | 678fc4d292664550df554a224b8fd59dcef20d35 (diff) |
Add support for language preferences for trending statuses and links (#18288)
Diffstat (limited to 'app/views/admin/trends/links')
-rw-r--r-- | app/views/admin/trends/links/_preview_card.html.haml | 4 | ||||
-rw-r--r-- | app/views/admin/trends/links/index.html.haml | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/views/admin/trends/links/_preview_card.html.haml b/app/views/admin/trends/links/_preview_card.html.haml index 7d4897c7e..8812feb31 100644 --- a/app/views/admin/trends/links/_preview_card.html.haml +++ b/app/views/admin/trends/links/_preview_card.html.haml @@ -18,9 +18,9 @@ = t('admin.trends.links.shared_by_over_week', count: preview_card.history.reduce(0) { |sum, day| sum + day.accounts }) - - if preview_card.trendable? && (rank = Trends.links.rank(preview_card.id, locale: params[:locale].presence)) + - if preview_card.trend.allowed? • - %abbr{ title: t('admin.trends.tags.current_score', score: Trends.links.score(preview_card.id, locale: params[:locale].presence)) }= t('admin.trends.tags.trending_rank', rank: rank + 1) + %abbr{ title: t('admin.trends.tags.current_score', score: preview_card.trend.score) }= t('admin.trends.tags.trending_rank', rank: preview_card.trend.rank) - if preview_card.decaying? • diff --git a/app/views/admin/trends/links/index.html.haml b/app/views/admin/trends/links/index.html.haml index 49a53d979..7b5122cf1 100644 --- a/app/views/admin/trends/links/index.html.haml +++ b/app/views/admin/trends/links/index.html.haml @@ -16,7 +16,7 @@ .filter-subset.filter-subset--with-select %strong= t('admin.follow_recommendations.language') .input.select.optional - = select_tag :locale, options_for_select(Trends.available_locales.map { |key| [standard_locale_name(key), key] }, params[:locale]), include_blank: true + = select_tag :locale, options_for_select(@locales.map { |key| [standard_locale_name(key), key] }, params[:locale]), include_blank: true .filter-subset %strong= t('admin.trends.trending') %ul |