diff --git a/app/models/foi_attachment.rb b/app/models/foi_attachment.rb index f0c726d373..de9e701969 100644 --- a/app/models/foi_attachment.rb +++ b/app/models/foi_attachment.rb @@ -49,6 +49,7 @@ class FoiAttachment < ApplicationRecord before_destroy :delete_cached_file! scope :binary, -> { where.not(content_type: AlaveteliTextMasker::TextMask) } + scope :substantive, -> { reject(&:main_body_part?) } delegate :expire, :log_event, to: :info_request delegate :metadata, to: :file_blob diff --git a/app/views/admin_request/_some_attachments.html.erb b/app/views/admin_request/_some_attachments.html.erb new file mode 100644 index 0000000000..14f60b9b86 --- /dev/null +++ b/app/views/admin_request/_some_attachments.html.erb @@ -0,0 +1,27 @@ +
diff --git a/app/views/admin_request/show.html.erb b/app/views/admin_request/show.html.erb index 4946874df6..85270f7f46 100644 --- a/app/views/admin_request/show.html.erb +++ b/app/views/admin_request/show.html.erb @@ -372,6 +372,16 @@Excludes main body part attachments.
+