_tag.html.haml 1.1 KB

123456789101112131415161718192021222324
  1. .batch-table__row{ class: [tag.requires_review? && 'batch-table__row--attention', !tag.requires_review? && !tag.trendable? && 'batch-table__row--muted'] }
  2. %label.batch-table__row__select.batch-table__row__select--aligned.batch-checkbox
  3. = f.check_box :tag_ids, { multiple: true, include_hidden: false }, tag.id
  4. .batch-table__row__content.pending-account
  5. .pending-account__header
  6. = link_to admin_tag_path(tag.id) do
  7. = fa_icon 'hashtag'
  8. = tag.display_name
  9. %br/
  10. = t('admin.trends.tags.used_by_over_week', count: tag.history.reduce(0) { |sum, day| sum + day.accounts })
  11. - if tag.trendable? && (rank = Trends.tags.rank(tag.id))
  12. %abbr{ title: t('admin.trends.tags.current_score', score: Trends.tags.score(tag.id)) }= t('admin.trends.tags.trending_rank', rank: rank + 1)
  13. - if tag.decaying?
  14. = t('admin.trends.tags.peaked_on_and_decaying', date: l(tag.max_score_at.to_date, format: :short))
  15. - elsif tag.requires_review?
  16. = t('admin.trends.pending_review')