about summary refs log tree commit diff
path: root/app/views/admin/trends/tags/_tag.html.haml
blob: 7bb99b15800956c9fc25ac96f15d7323bc679c65 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.batch-table__row{ class: [tag.requires_review? && 'batch-table__row--attention', !tag.requires_review? && !tag.trendable? && 'batch-table__row--muted'] }
  %label.batch-table__row__select.batch-table__row__select--aligned.batch-checkbox
    = f.check_box :tag_ids, { multiple: true, include_hidden: false }, tag.id

  .batch-table__row__content.pending-account
    .pending-account__header
      = link_to admin_tag_path(tag.id) do
        = fa_icon 'hashtag'
        = tag.name

      %br/

      = t('admin.trends.tags.used_by_over_week', count: tag.history.reduce(0) { |sum, day| sum + day.accounts })

      - if tag.trendable? && (rank = Trends.tags.rank(tag.id))
        •
        %abbr{ title: t('admin.trends.tags.current_score', score: Trends.tags.score(tag.id)) }= t('admin.trends.tags.trending_rank', rank: rank + 1)

        - if tag.decaying?
          •
          = t('admin.trends.tags.peaked_on_and_decaying', date: l(tag.max_score_at.to_date, format: :short))
      - elsif tag.requires_review?
        •
        = t('admin.trends.pending_review')