Merge tag 'v3.1.1' into instance_only_statuses
This commit is contained in:
@ -22,7 +22,7 @@
|
||||
|
||||
= form_tag admin_accounts_url, method: 'GET', class: 'simple_form' do
|
||||
.fields-group
|
||||
- Admin::FilterHelper::ACCOUNT_FILTERS.each do |key|
|
||||
- AccountFilter::KEYS.each do |key|
|
||||
- if params[key].present?
|
||||
= hidden_field_tag key, params[key]
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
.dashboard__counters__num= number_to_human_size @account.media_attachments.sum('file_file_size')
|
||||
.dashboard__counters__label= t 'admin.accounts.media_attachments'
|
||||
%div
|
||||
= link_to admin_account_followers_path(@account.id) do
|
||||
= link_to admin_account_relationships_path(@account.id, location: 'local', relationship: 'followed_by') do
|
||||
.dashboard__counters__num= number_with_delimiter @account.local_followers_count
|
||||
.dashboard__counters__label= t 'admin.accounts.followers'
|
||||
%div
|
||||
@ -139,16 +139,19 @@
|
||||
%time.formatted{ datetime: @account.created_at.iso8601, title: l(@account.created_at) }= l @account.created_at
|
||||
%td
|
||||
|
||||
%tr
|
||||
%th= t('admin.accounts.most_recent_ip')
|
||||
%td= @account.user_current_sign_in_ip
|
||||
%td
|
||||
- @account.user.recent_ips.each_with_index do |(_, ip), i|
|
||||
%tr
|
||||
- if i.zero?
|
||||
%th{ rowspan: @account.user.recent_ips.size }= t('admin.accounts.most_recent_ip')
|
||||
%td= ip
|
||||
%td= table_link_to 'search', t('admin.accounts.search_same_ip'), admin_accounts_path(ip: ip)
|
||||
|
||||
%tr
|
||||
%th= t('admin.accounts.most_recent_activity')
|
||||
%td
|
||||
- if @account.user_current_sign_in_at
|
||||
%time.formatted{ datetime: @account.user_current_sign_in_at.iso8601, title: l(@account.user_current_sign_in_at) }= l @account.user_current_sign_in_at
|
||||
%td
|
||||
|
||||
- if @account.user&.invited?
|
||||
%tr
|
||||
|
19
app/views/admin/announcements/_announcement.html.haml
Normal file
19
app/views/admin/announcements/_announcement.html.haml
Normal file
@ -0,0 +1,19 @@
|
||||
.announcements-list__item
|
||||
= link_to edit_admin_announcement_path(announcement), class: 'announcements-list__item__title' do
|
||||
= truncate(announcement.text)
|
||||
|
||||
.announcements-list__item__action-bar
|
||||
.announcements-list__item__meta
|
||||
- if announcement.scheduled_at.present?
|
||||
= t('admin.announcements.scheduled_for', time: l(announcement.scheduled_at))
|
||||
- else
|
||||
= l(announcement.created_at)
|
||||
|
||||
%div
|
||||
- if can?(:update, announcement)
|
||||
- if announcement.published?
|
||||
= table_link_to 'toggle-off', t('admin.announcements.unpublish'), unpublish_admin_announcement_path(announcement), method: :post, data: { confirm: t('admin.accounts.are_you_sure') }
|
||||
- else
|
||||
= table_link_to 'toggle-on', t('admin.announcements.publish'), publish_admin_announcement_path(announcement), method: :post, data: { confirm: t('admin.accounts.are_you_sure') }
|
||||
|
||||
= table_link_to 'trash', t('generic.delete'), admin_announcement_path(announcement), method: :delete, data: { confirm: t('admin.accounts.are_you_sure') } if can?(:destroy, announcement)
|
22
app/views/admin/announcements/edit.html.haml
Normal file
22
app/views/admin/announcements/edit.html.haml
Normal file
@ -0,0 +1,22 @@
|
||||
- content_for :page_title do
|
||||
= t('.title')
|
||||
|
||||
= simple_form_for @announcement, url: admin_announcement_path(@announcement) do |f|
|
||||
= render 'shared/error_messages', object: @announcement
|
||||
|
||||
.fields-group
|
||||
= f.input :starts_at, include_blank: true, wrapper: :with_block_label
|
||||
= f.input :ends_at, include_blank: true, wrapper: :with_block_label
|
||||
|
||||
.fields-group
|
||||
= f.input :all_day, as: :boolean, wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :text, wrapper: :with_block_label
|
||||
|
||||
- unless @announcement.published?
|
||||
.fields-group
|
||||
= f.input :scheduled_at, include_blank: true, wrapper: :with_block_label
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
22
app/views/admin/announcements/index.html.haml
Normal file
22
app/views/admin/announcements/index.html.haml
Normal file
@ -0,0 +1,22 @@
|
||||
- content_for :page_title do
|
||||
= t('admin.announcements.title')
|
||||
|
||||
- content_for :heading_actions do
|
||||
= link_to t('admin.announcements.new.title'), new_admin_announcement_path, class: 'button'
|
||||
|
||||
.filters
|
||||
.filter-subset
|
||||
%strong= t('admin.relays.status')
|
||||
%ul
|
||||
%li= filter_link_to t('generic.all'), published: nil, unpublished: nil
|
||||
%li= filter_link_to safe_join([t('admin.announcements.live'), "(#{number_with_delimiter(Announcement.published.count)})"], ' '), published: '1', unpublished: nil
|
||||
|
||||
- if @announcements.empty?
|
||||
%div.muted-hint.center-text
|
||||
= t 'admin.announcements.empty'
|
||||
- else
|
||||
.announcements-list
|
||||
= render partial: 'announcement', collection: @announcements
|
||||
|
||||
= paginate @announcements
|
||||
|
21
app/views/admin/announcements/new.html.haml
Normal file
21
app/views/admin/announcements/new.html.haml
Normal file
@ -0,0 +1,21 @@
|
||||
- content_for :page_title do
|
||||
= t('.title')
|
||||
|
||||
= simple_form_for @announcement, url: admin_announcements_path do |f|
|
||||
= render 'shared/error_messages', object: @announcement
|
||||
|
||||
.fields-group
|
||||
= f.input :starts_at, include_blank: true, wrapper: :with_block_label
|
||||
= f.input :ends_at, include_blank: true, wrapper: :with_block_label
|
||||
|
||||
.fields-group
|
||||
= f.input :all_day, as: :boolean, wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :text, wrapper: :with_block_label
|
||||
|
||||
.fields-group
|
||||
= f.input :scheduled_at, include_blank: true, wrapper: :with_block_label
|
||||
|
||||
.actions
|
||||
= f.button :button, t('.create'), type: :submit
|
@ -4,6 +4,9 @@
|
||||
- content_for :header_tags do
|
||||
= javascript_pack_tag 'admin', integrity: true, async: true, crossorigin: 'anonymous'
|
||||
|
||||
- content_for :heading_actions do
|
||||
= link_to t('admin.custom_emojis.upload'), new_admin_custom_emoji_path, class: 'button'
|
||||
|
||||
.filters
|
||||
.filter-subset
|
||||
%strong= t('admin.accounts.location.title')
|
||||
@ -22,7 +25,7 @@
|
||||
|
||||
= form_tag admin_custom_emojis_url, method: 'GET', class: 'simple_form' do
|
||||
.fields-group
|
||||
- Admin::FilterHelper::CUSTOM_EMOJI_FILTERS.each do |key|
|
||||
- CustomEmojiFilter::KEYS.each do |key|
|
||||
= hidden_field_tag key, params[key] if params[key].present?
|
||||
|
||||
- %i(shortcode by_domain).each do |key|
|
||||
@ -36,7 +39,7 @@
|
||||
= form_for(@form, url: batch_admin_custom_emojis_path) do |f|
|
||||
= hidden_field_tag :page, params[:page] || 1
|
||||
|
||||
- Admin::FilterHelper::CUSTOM_EMOJI_FILTERS.each do |key|
|
||||
- CustomEmojiFilter::KEYS.each do |key|
|
||||
= hidden_field_tag key, params[key] if params[key].present?
|
||||
|
||||
.batch-table
|
||||
@ -81,6 +84,3 @@
|
||||
|
||||
= paginate @custom_emojis
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
= link_to t('admin.custom_emojis.upload'), new_admin_custom_emoji_path, class: 'button'
|
||||
|
@ -1,14 +1,19 @@
|
||||
- content_for :page_title do
|
||||
= t('admin.email_domain_blocks.title')
|
||||
|
||||
.table-wrapper
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
%th= t('admin.email_domain_blocks.domain')
|
||||
%th
|
||||
%tbody
|
||||
= render @email_domain_blocks
|
||||
- content_for :heading_actions do
|
||||
= link_to t('admin.email_domain_blocks.add_new'), new_admin_email_domain_block_path, class: 'button'
|
||||
|
||||
- if @email_domain_blocks.empty?
|
||||
%div.muted-hint.center-text=t 'admin.email_domain_blocks.empty'
|
||||
- else
|
||||
.table-wrapper
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
%th= t('admin.email_domain_blocks.domain')
|
||||
%th
|
||||
%tbody
|
||||
= render @email_domain_blocks
|
||||
|
||||
= paginate @email_domain_blocks
|
||||
= link_to t('admin.email_domain_blocks.add_new'), new_admin_email_domain_block_path, class: 'button'
|
||||
|
@ -1,28 +0,0 @@
|
||||
- content_for :page_title do
|
||||
= t('admin.followers.title', acct: @account.acct)
|
||||
|
||||
.filters
|
||||
.filter-subset
|
||||
%strong= t('admin.accounts.location.title')
|
||||
%ul
|
||||
%li= link_to t('admin.accounts.location.local'), admin_account_followers_path(@account.id), class: 'selected'
|
||||
.back-link{ style: 'flex: 1 1 auto; text-align: right' }
|
||||
= link_to admin_account_path(@account.id) do
|
||||
= fa_icon 'chevron-left fw'
|
||||
= t('admin.followers.back_to_account')
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
.table-wrapper
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
%th= t('admin.accounts.username')
|
||||
%th= t('admin.accounts.role')
|
||||
%th= t('admin.accounts.most_recent_ip')
|
||||
%th= t('admin.accounts.most_recent_activity')
|
||||
%th
|
||||
%tbody
|
||||
= render partial: 'admin/accounts/account', collection: @followers
|
||||
|
||||
= paginate @followers
|
@ -19,9 +19,8 @@
|
||||
- unless whitelist_mode?
|
||||
= form_tag admin_instances_url, method: 'GET', class: 'simple_form' do
|
||||
.fields-group
|
||||
- Admin::FilterHelper::INSTANCES_FILTERS.each do |key|
|
||||
- if params[key].present?
|
||||
= hidden_field_tag key, params[key]
|
||||
- InstanceFilter::KEYS.each do |key|
|
||||
= hidden_field_tag key, params[key] if params[key].present?
|
||||
|
||||
- %i(by_domain).each do |key|
|
||||
.input.string.optional
|
||||
|
@ -19,7 +19,7 @@
|
||||
.dashboard__counters__num= number_with_delimiter @blocks_count
|
||||
.dashboard__counters__label= t 'admin.instances.total_blocked_by_us'
|
||||
%div
|
||||
%div
|
||||
= link_to admin_reports_path(by_target_domain: @instance.domain) do
|
||||
.dashboard__counters__num= number_with_delimiter @reports_count
|
||||
.dashboard__counters__label= t 'admin.instances.total_reported'
|
||||
%div
|
||||
|
39
app/views/admin/relationships/index.html.haml
Normal file
39
app/views/admin/relationships/index.html.haml
Normal file
@ -0,0 +1,39 @@
|
||||
- content_for :page_title do
|
||||
= t('admin.relationships.title', acct: @account.acct)
|
||||
|
||||
.filters
|
||||
.filter-subset
|
||||
%strong= t 'relationships.relationship'
|
||||
%ul
|
||||
%li= filter_link_to t('relationships.following'), relationship: nil
|
||||
%li= filter_link_to t('relationships.followers'), relationship: 'followed_by'
|
||||
%li= filter_link_to t('relationships.mutual'), relationship: 'mutual'
|
||||
%li= filter_link_to t('relationships.invited'), relationship: 'invited'
|
||||
|
||||
.filter-subset
|
||||
%strong= t('admin.accounts.location.title')
|
||||
%ul
|
||||
%li= filter_link_to t('admin.accounts.moderation.all'), location: nil
|
||||
%li= filter_link_to t('admin.accounts.location.local'), location: 'local'
|
||||
%li= filter_link_to t('admin.accounts.location.remote'), location: 'remote'
|
||||
|
||||
.back-link{ style: 'flex: 1 1 auto; text-align: right' }
|
||||
= link_to admin_account_path(@account.id) do
|
||||
= fa_icon 'chevron-left fw'
|
||||
= t('admin.statuses.back_to_account')
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
.table-wrapper
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
%th= t('admin.accounts.username')
|
||||
%th= t('admin.accounts.role')
|
||||
%th= t('admin.accounts.most_recent_ip')
|
||||
%th= t('admin.accounts.most_recent_activity')
|
||||
%th
|
||||
%tbody
|
||||
= render partial: 'admin/accounts/account', collection: @accounts
|
||||
|
||||
= paginate @accounts
|
@ -14,12 +14,15 @@
|
||||
- unless status.proper.media_attachments.empty?
|
||||
- if status.proper.media_attachments.first.video?
|
||||
- video = status.proper.media_attachments.first
|
||||
= react_component :video, src: video.file.url(:original), preview: video.file.url(:small), sensitive: !current_account&.user&.show_all_media? && status.proper.sensitive? || current_account&.user&.hide_all_media?, width: 610, height: 343, inline: true, alt: video.description
|
||||
= react_component :video, src: video.file.url(:original), preview: video.file.url(:small), blurhash: video.blurhash, sensitive: status.proper.sensitive?, visible: false, width: 610, height: 343, inline: true, alt: video.description
|
||||
- elsif status.proper.media_attachments.first.audio?
|
||||
- audio = status.proper.media_attachments.first
|
||||
= react_component :audio, src: audio.file.url(:original), height: 110, alt: audio.description, duration: audio.file.meta.dig(:original, :duration)
|
||||
- else
|
||||
= react_component :media_gallery, height: 343, sensitive: !current_account&.user&.show_all_media? && status.proper.sensitive? || current_account&.user&.hide_all_media?, 'autoPlayGif': current_account&.user&.setting_auto_play_gif, media: status.proper.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json }
|
||||
= react_component :media_gallery, height: 343, sensitive: status.proper.sensitive?, visible: false, media: status.proper.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json }
|
||||
|
||||
.detailed-status__meta
|
||||
= link_to ActivityPub::TagManager.instance.url_for(status), class: 'detailed-status__datetime', target: stream_link_target, rel: 'noopener' do
|
||||
= link_to ActivityPub::TagManager.instance.url_for(status), class: 'detailed-status__datetime', target: stream_link_target, rel: 'noopener noreferrer' do
|
||||
%time.formatted{ datetime: status.created_at.iso8601, title: l(status.created_at) }= l(status.created_at)
|
||||
- if status.discarded?
|
||||
·
|
||||
|
@ -8,13 +8,26 @@
|
||||
%li= filter_link_to t('admin.reports.unresolved'), resolved: nil
|
||||
%li= filter_link_to t('admin.reports.resolved'), resolved: '1'
|
||||
|
||||
= form_tag admin_reports_url, method: 'GET', class: 'simple_form' do
|
||||
.fields-group
|
||||
- ReportFilter::KEYS.each do |key|
|
||||
= hidden_field_tag key, params[key] if params[key].present?
|
||||
|
||||
- %i(by_target_domain).each do |key|
|
||||
.input.string.optional
|
||||
= text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.reports.#{key}")
|
||||
|
||||
.actions
|
||||
%button= t('admin.accounts.search')
|
||||
= link_to t('admin.accounts.reset'), admin_reports_path, class: 'button negative'
|
||||
|
||||
- @reports.group_by(&:target_account_id).each do |target_account_id, reports|
|
||||
- target_account = reports.first.target_account
|
||||
.report-card
|
||||
.report-card__profile
|
||||
= account_link_to target_account, '', size: 36, path: admin_account_path(target_account.id)
|
||||
.report-card__profile__stats
|
||||
= link_to pluralize(target_account.targeted_moderation_notes.count, t('admin.reports.account.note')), admin_account_path(target_account.id)
|
||||
= link_to t('admin.reports.account.notes', count: target_account.targeted_moderation_notes.count), admin_account_path(target_account.id)
|
||||
%br/
|
||||
- if target_account.suspended?
|
||||
%span.red= t('admin.accounts.suspended')
|
||||
|
@ -4,37 +4,28 @@
|
||||
- content_for :page_title do
|
||||
= t('admin.reports.report', id: @report.id)
|
||||
|
||||
%div{ style: 'overflow: hidden; margin-bottom: 20px' }
|
||||
- content_for :heading_actions do
|
||||
- if @report.unresolved?
|
||||
%div{ style: 'float: right' }
|
||||
- if @report.target_account.local?
|
||||
= link_to t('admin.accounts.warn'), new_admin_account_action_path(@report.target_account_id, type: 'none', report_id: @report.id), class: 'button'
|
||||
= link_to t('admin.accounts.disable'), new_admin_account_action_path(@report.target_account_id, type: 'disable', report_id: @report.id), class: 'button button--destructive'
|
||||
= link_to t('admin.accounts.silence'), new_admin_account_action_path(@report.target_account_id, type: 'silence', report_id: @report.id), class: 'button button--destructive'
|
||||
= link_to t('admin.accounts.perform_full_suspension'), new_admin_account_action_path(@report.target_account_id, type: 'suspend', report_id: @report.id), class: 'button button--destructive'
|
||||
%div{ style: 'float: left' }
|
||||
= link_to t('admin.reports.mark_as_resolved'), resolve_admin_report_path(@report), method: :post, class: 'button'
|
||||
= link_to t('admin.reports.mark_as_resolved'), resolve_admin_report_path(@report), method: :post, class: 'button'
|
||||
- else
|
||||
= link_to t('admin.reports.mark_as_unresolved'), reopen_admin_report_path(@report), method: :post, class: 'button'
|
||||
|
||||
%hr.spacer
|
||||
|
||||
.table-wrapper
|
||||
%table.table.inline-table
|
||||
%tbody
|
||||
%tr
|
||||
%th= t('admin.reports.reported_account')
|
||||
%td= admin_account_link_to @report.target_account
|
||||
%td= table_link_to 'flag', pluralize(@report.target_account.targeted_reports.count, t('admin.reports.account.report')), admin_reports_path(target_account_id: @report.target_account.id)
|
||||
%td= table_link_to 'file', pluralize(@report.target_account.targeted_moderation_notes.count, t('admin.reports.account.note')), admin_reports_path(target_account_id: @report.target_account.id)
|
||||
%td= table_link_to 'flag', t('admin.reports.account.reports', count: @report.target_account.targeted_reports.count), admin_reports_path(target_account_id: @report.target_account.id)
|
||||
%td= table_link_to 'file', t('admin.reports.account.notes', count: @report.target_account.targeted_moderation_notes.count), admin_reports_path(target_account_id: @report.target_account.id)
|
||||
%tr
|
||||
%th= t('admin.reports.reported_by')
|
||||
- if @report.account.instance_actor?
|
||||
%td{ colspan: 3 }= site_hostname
|
||||
- elsif @report.account.local?
|
||||
%td= admin_account_link_to @report.account
|
||||
%td= table_link_to 'flag', pluralize(@report.account.targeted_reports.count, t('admin.reports.account.report')), admin_reports_path(target_account_id: @report.account.id)
|
||||
%td= table_link_to 'file', pluralize(@report.account.targeted_moderation_notes.count, t('admin.reports.account.note')), admin_reports_path(target_account_id: @report.account.id)
|
||||
%td= table_link_to 'flag', t('admin.reports.account.reports', count: @report.account.targeted_reports.count), admin_reports_path(target_account_id: @report.account.id)
|
||||
%td= table_link_to 'file', t('admin.reports.account.notes', count: @report.account.targeted_moderation_notes.count), admin_reports_path(target_account_id: @report.account.id)
|
||||
- else
|
||||
%td{ colspan: 3 }= @report.account.domain
|
||||
%tr
|
||||
@ -77,6 +68,17 @@
|
||||
|
||||
%hr.spacer
|
||||
|
||||
%div{ style: 'overflow: hidden; margin-bottom: 20px; clear: both' }
|
||||
- if @report.unresolved?
|
||||
%div{ style: 'float: right' }
|
||||
- if @report.target_account.local?
|
||||
= link_to t('admin.accounts.warn'), new_admin_account_action_path(@report.target_account_id, type: 'none', report_id: @report.id), class: 'button'
|
||||
= link_to t('admin.accounts.disable'), new_admin_account_action_path(@report.target_account_id, type: 'disable', report_id: @report.id), class: 'button button--destructive'
|
||||
= link_to t('admin.accounts.silence'), new_admin_account_action_path(@report.target_account_id, type: 'silence', report_id: @report.id), class: 'button button--destructive'
|
||||
= link_to t('admin.accounts.perform_full_suspension'), new_admin_account_action_path(@report.target_account_id, type: 'suspend', report_id: @report.id), class: 'button button--destructive'
|
||||
|
||||
%hr.spacer
|
||||
|
||||
.speech-bubble
|
||||
.speech-bubble__bubble= simple_format(@report.comment.presence || t('admin.reports.comment.none'))
|
||||
.speech-bubble__owner
|
||||
|
@ -1,3 +1,6 @@
|
||||
- content_for :header_tags do
|
||||
= javascript_pack_tag 'admin', integrity: true, async: true, crossorigin: 'anonymous'
|
||||
|
||||
- content_for :page_title do
|
||||
= t('admin.settings.title')
|
||||
|
||||
@ -38,7 +41,9 @@
|
||||
%hr.spacer/
|
||||
|
||||
.fields-group
|
||||
= f.input :bootstrap_timeline_accounts, wrapper: :with_block_label, label: t('admin.settings.bootstrap_timeline_accounts.title'), hint: t('admin.settings.bootstrap_timeline_accounts.desc_html')
|
||||
= f.input :enable_bootstrap_timeline_accounts, as: :boolean, wrapper: :with_label, label: t('admin.settings.enable_bootstrap_timeline_accounts.title')
|
||||
.fields-group
|
||||
= f.input :bootstrap_timeline_accounts, wrapper: :with_block_label, label: t('admin.settings.bootstrap_timeline_accounts.title'), hint: t('admin.settings.bootstrap_timeline_accounts.desc_html'), disabled: !Setting.enable_bootstrap_timeline_accounts
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
.batch-table__row
|
||||
%label.batch-table__row__select.batch-table__row__select--aligned.batch-checkbox
|
||||
= f.check_box :tag_ids, { multiple: true, include_hidden: false }, tag.id
|
||||
- if batch_available
|
||||
%label.batch-table__row__select.batch-table__row__select--aligned.batch-checkbox
|
||||
= f.check_box :tag_ids, { multiple: true, include_hidden: false }, tag.id
|
||||
|
||||
.directory__tag
|
||||
= link_to admin_tag_path(tag.id) do
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
= form_tag admin_tags_url, method: 'GET', class: 'simple_form' do
|
||||
.fields-group
|
||||
- Admin::FilterHelper::TAGS_FILTERS.each do |key|
|
||||
- TagFilter::KEYS.each do |key|
|
||||
= hidden_field_tag key, params[key] if params[key].present?
|
||||
|
||||
- %i(name).each do |key|
|
||||
@ -43,32 +43,32 @@
|
||||
|
||||
= form_for(@form, url: batch_admin_tags_path) do |f|
|
||||
= hidden_field_tag :page, params[:page] || 1
|
||||
= hidden_field_tag :name, params[:name] if params[:name].present?
|
||||
|
||||
- Admin::FilterHelper::TAGS_FILTERS.each do |key|
|
||||
- TagFilter::KEYS.each do |key|
|
||||
= hidden_field_tag key, params[key] if params[key].present?
|
||||
|
||||
.batch-table
|
||||
.batch-table.optional
|
||||
.batch-table__toolbar
|
||||
%label.batch-table__toolbar__select.batch-checkbox-all
|
||||
= check_box_tag :batch_checkbox_all, nil, false
|
||||
.batch-table__toolbar__actions
|
||||
- if params[:pending_review] == '1'
|
||||
- if params[:pending_review] == '1' || params[:unreviewed] == '1'
|
||||
%label.batch-table__toolbar__select.batch-checkbox-all
|
||||
= check_box_tag :batch_checkbox_all, nil, false
|
||||
.batch-table__toolbar__actions
|
||||
= f.button safe_join([fa_icon('check'), t('admin.accounts.approve')]), name: :approve, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
|
||||
= f.button safe_join([fa_icon('times'), t('admin.accounts.reject')]), name: :reject, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
- else
|
||||
- else
|
||||
.batch-table__toolbar__actions
|
||||
%span.neutral-hint= t('generic.no_batch_actions_available')
|
||||
|
||||
.batch-table__body
|
||||
- if @tags.empty?
|
||||
= nothing_here 'nothing-here--under-tabs'
|
||||
- else
|
||||
= render partial: 'tag', collection: @tags, locals: { f: f }
|
||||
= render partial: 'tag', collection: @tags, locals: { f: f, batch_available: params[:pending_review] == '1' || params[:unreviewed] == '1' }
|
||||
|
||||
= paginate @tags
|
||||
|
||||
- if params[:pending_review] == '1'
|
||||
- if params[:pending_review] == '1' || params[:unreviewed] == '1'
|
||||
%hr.spacer/
|
||||
|
||||
%div{ style: 'overflow: hidden' }
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
.dashboard__counters
|
||||
%div
|
||||
= link_to tag_url(@tag), target: '_blank', rel: 'noopener' do
|
||||
= link_to tag_url(@tag), target: '_blank', rel: 'noopener noreferrer' do
|
||||
.dashboard__counters__num= number_with_delimiter @accounts_today
|
||||
.dashboard__counters__label= t 'admin.tags.accounts_today'
|
||||
%div
|
||||
|
Reference in New Issue
Block a user