about summary refs log tree commit diff
path: root/app/models/report.rb
diff options
context:
space:
mode:
authorEffy Elden <github@effy.is>2017-04-24 08:44:37 +1000
committerEugen <eugen@zeonfederated.com>2017-04-24 00:44:37 +0200
commit1801a36414ee79bd51aad23fc5ff6a90049e7270 (patch)
tree6966c2b6f1faa719acc4fec565ee3d403661ba89 /app/models/report.rb
parent501514960a9de238e23cd607d2e8f4c1ff9f16c1 (diff)
Report processing improvements (#2349)
* Expose media attachments on reported statuses directly

* Comment out unused bulk report checkbox. Add title to report comment for viewing full comment. Add 'contents' column, with icons and numerical indicators to show the number of referenced statuses and media attachments in the report

* Link account name on authorize_follow card back to account

* Add localisation string for report_contents

* Show new admin accounts card partial on report view. Apply simple_format to report comment so newlines are preserved.

* Add new admin accounts card partial, for display quick useful admin stats (e.g. report history, moderation status).

* Fix localized variable
Diffstat (limited to 'app/models/report.rb')
-rw-r--r--app/models/report.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/report.rb b/app/models/report.rb
index 54157ed8c..c7d887745 100644
--- a/app/models/report.rb
+++ b/app/models/report.rb
@@ -11,4 +11,12 @@ class Report < ApplicationRecord
   def statuses
     Status.where(id: status_ids)
   end
+
+  def media_attachments
+    media_attachments = []
+    statuses.each do |s|
+      media_attachments.concat s.media_attachments
+    end
+    media_attachments
+  end
 end