about summary refs log tree commit diff
path: root/app/views/admin/trends/statuses/_status.html.haml
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-02-26 09:29:23 +0100
committerClaire <claire.github-309c@sitedethib.com>2022-02-26 09:29:23 +0100
commitbe493b6c0d60778257cbd6247f9287f939fc7e4e (patch)
tree07c127fc0e059ccd185c40a3c4497706f3bcacc7 /app/views/admin/trends/statuses/_status.html.haml
parente48eaf64cc7cb0cfab388331c4823ee5fb580d59 (diff)
parenta5c24d5c4d75f3f3144f69c8f60f542707a82584 (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `app/models/account.rb`:
  Not a real conflict, just upstream getting rid of unused constants too close
  to glitch-soc-specific contents.
  Removed unused constants like upstream did.
- `app/models/trends.rb`:
  Conflict because glitch-soc disabled email notifications for trending links.
  Upstream has refactored this quite a bit and added trending posts.
  Took upstream code, but disabling the extra trending stuff will come in
  another commit.
- `app/views/admin/trends/links/index.html.haml`:
  Conflict due to glitch-soc's theming system.
  Ported upstream changes accordingly.
Diffstat (limited to 'app/views/admin/trends/statuses/_status.html.haml')
-rw-r--r--app/views/admin/trends/statuses/_status.html.haml30
1 files changed, 30 insertions, 0 deletions
diff --git a/app/views/admin/trends/statuses/_status.html.haml b/app/views/admin/trends/statuses/_status.html.haml
new file mode 100644
index 000000000..c99ee5d60
--- /dev/null
+++ b/app/views/admin/trends/statuses/_status.html.haml
@@ -0,0 +1,30 @@
+.batch-table__row{ class: [status.account.requires_review? && 'batch-table__row--attention', !status.account.requires_review? && !status.trendable? && 'batch-table__row--muted'] }
+  %label.batch-table__row__select.batch-table__row__select--aligned.batch-checkbox
+    = f.check_box :status_ids, { multiple: true, include_hidden: false }, status.id
+
+  .batch-table__row__content.pending-account__header
+    .one-liner
+      = admin_account_link_to status.account
+
+      = link_to ActivityPub::TagManager.instance.url_for(status), target: '_blank', class: 'emojify', rel: 'noopener noreferrer' do
+        = one_line_preview(status)
+
+        - status.media_attachments.each do |media_attachment|
+          %abbr{ title: media_attachment.description }
+            = fa_icon 'link'
+            = media_attachment.file_file_name
+
+    = t('admin.trends.statuses.shared_by', count: status.reblogs_count + status.favourites_count, friendly_count: friendly_number_to_human(status.reblogs_count + status.favourites_count))
+
+    - if status.account.domain.present?
+      •
+      = status.account.domain
+    - if status.language.present?
+      •
+      = standard_locale_name(status.language)
+    - if status.trendable? && (rank = Trends.statuses.rank(status.id))
+      •
+      %abbr{ title: t('admin.trends.tags.current_score', score: Trends.statuses.score(status.id)) }= t('admin.trends.tags.trending_rank', rank: rank + 1)
+    - elsif status.account.requires_review?
+      •
+      = t('admin.trends.pending_review')