_preview_card.html.haml 1.3 KB

123456789101112131415161718192021222324252627282930
  1. .batch-table__row{ class: [preview_card.requires_review? && 'batch-table__row--attention', !preview_card.requires_review? && !preview_card.trendable? && 'batch-table__row--muted'] }
  2. %label.batch-table__row__select.batch-table__row__select--aligned.batch-checkbox
  3. = f.check_box :preview_card_ids, { multiple: true, include_hidden: false }, preview_card.id
  4. .batch-table__row__content.pending-account
  5. .pending-account__header
  6. = link_to preview_card.title, url_for_preview_card(preview_card)
  7. %br/
  8. - if preview_card.provider_name.present?
  9. = preview_card.provider_name
  10. ·
  11. - if preview_card.language.present?
  12. = standard_locale_name(preview_card.language)
  13. ·
  14. = t('admin.trends.links.shared_by_over_week', count: preview_card.history.reduce(0) { |sum, day| sum + day.accounts })
  15. - if preview_card.trend.allowed?
  16. ·
  17. %abbr{ title: t('admin.trends.tags.current_score', score: preview_card.trend.score) }= t('admin.trends.tags.trending_rank', rank: preview_card.trend.rank)
  18. - if preview_card.decaying?
  19. ·
  20. = t('admin.trends.tags.peaked_on_and_decaying', date: l(preview_card.max_score_at.to_date, format: :short))
  21. - elsif preview_card.requires_review?
  22. ·
  23. = t('admin.trends.pending_review')