Remove moderation tool media list page

This commit is contained in:
KMY 2023-09-21 16:20:07 +09:00
parent 3c317659c4
commit e84eb3fc81
6 changed files with 0 additions and 92 deletions

View file

@ -1,18 +0,0 @@
# frozen_string_literal: true
module Admin
class MediaAttachmentsController < BaseController
def index
authorize :account, :index?
@media_attachments = filtered_attachments.page(params[:page])
@form = Form::MediaAttachmentsBatch.new
end
private
def filtered_attachments
MediaAttachment.local_attached.reverse_order
end
end
end

View file

@ -1,12 +0,0 @@
# frozen_string_literal: true
class Form::MediaAttachmentsBatch
include ActiveModel::Model
include Authorization
include AccountableConcern
include Payloadable
attr_accessor :query
def save; end
end

View file

@ -1,30 +0,0 @@
.batch-table__row{ class: ['batch-table__row--attention'] }
.batch-table__row__content.batch-table__row__content--unpadded
%table.media-attachments-table
%tbody
%tr
%td
%img.image{ src: media_attachment.url, alt: '' }
.detailed-status__meta
- if media_attachment.status.application
= media_attachment.status.application.name
·
= link_to ActivityPub::TagManager.instance.url_for(media_attachment.status), class: 'detailed-status__datetime', target: stream_link_target, rel: 'noopener noreferrer' do
%time.formatted{ datetime: media_attachment.status.created_at.iso8601, title: l(media_attachment.status.created_at) }= l(media_attachment.status.created_at)
- if media_attachment.status.edited?
·
= link_to t('statuses.edited_at_html', date: content_tag(:time, l(media_attachment.status.edited_at), datetime: media_attachment.status.edited_at.iso8601, title: l(media_attachment.status.edited_at), class: 'formatted')), admin_account_status_path(media_attachment.status.account_id, media_attachment.status), class: 'detailed-status__datetime'
- if media_attachment.status.discarded?
·
%span.negative-hint= t('admin.statuses.deleted')
·
- if media_attachment.status.reblog?
= fa_icon('retweet fw')
= t('statuses.boosted_from_html', acct_link: admin_account_inline_link_to(media_attachment.status.proper.account))
- else
= fa_visibility_icon(media_attachment.status)
= t("statuses.visibilities.#{media_attachment.status.visibility}")
- if media_attachment.status.proper.sensitive?
·
= fa_icon('eye-slash fw')
= t('stream_entries.sensitive_content')

View file

@ -1,30 +0,0 @@
- content_for :page_title do
= t('admin.media_attachments.title')
- content_for :header_tags do
= javascript_pack_tag 'admin', async: true, crossorigin: 'anonymous'
= form_for(@form, url: admin_media_attachments_path) do |f|
= hidden_field_tag :page, params[:page] || 1
= hidden_field_tag :select_all_matching, '0'
- AccountFilter::KEYS.each do |key|
= hidden_field_tag key, params[key] if params[key].present?
.batch-table
.batch-table__toolbar
- if @media_attachments.total_count > @media_attachments.size
.batch-table__select-all
.not-selected.active
%span= t('generic.all_items_on_page_selected_html', count: @media_attachments.size)
%button{ type: 'button' }= t('generic.select_all_matching_items', count: @media_attachments.total_count)
.selected
%span= t('generic.all_matching_items_selected_html', count: @media_attachments.total_count)
%button{ type: 'button' }= t('generic.deselect')
.batch-table__body
- if @media_attachments.empty?
= nothing_here 'nothing-here--under-tabs'
- else
= render partial: 'media_attachment', collection: @media_attachments, locals: { f: f }
= paginate @media_attachments