2016-12-13 23:42:10 +11:00
|
|
|
- content_for :page_title do
|
2017-04-14 05:49:07 +10:00
|
|
|
= t('admin.accounts.title')
|
2016-12-13 23:42:10 +11:00
|
|
|
|
2021-12-06 07:48:39 +11:00
|
|
|
- content_for :header_tags do
|
|
|
|
= javascript_pack_tag 'admin', async: true, crossorigin: 'anonymous'
|
|
|
|
|
2016-12-13 23:42:10 +11:00
|
|
|
.filters
|
|
|
|
.filter-subset
|
2017-04-14 05:49:07 +10:00
|
|
|
%strong= t('admin.accounts.location.title')
|
2016-12-13 23:42:10 +11:00
|
|
|
%ul
|
2021-12-06 07:48:39 +11:00
|
|
|
%li= filter_link_to t('generic.all'), origin: nil
|
|
|
|
%li= filter_link_to t('admin.accounts.location.local'), origin: 'local'
|
|
|
|
%li= filter_link_to t('admin.accounts.location.remote'), origin: 'remote'
|
2016-12-13 23:42:10 +11:00
|
|
|
.filter-subset
|
2017-04-14 05:49:07 +10:00
|
|
|
%strong= t('admin.accounts.moderation.title')
|
2016-12-13 23:42:10 +11:00
|
|
|
%ul
|
2021-12-06 07:48:39 +11:00
|
|
|
%li= filter_link_to t('generic.all'), status: nil
|
|
|
|
%li= filter_link_to t('admin.accounts.moderation.active'), status: 'active'
|
|
|
|
%li= filter_link_to t('admin.accounts.moderation.suspended'), status: 'suspended'
|
|
|
|
%li= filter_link_to safe_join([t('admin.accounts.moderation.pending'), "(#{number_with_delimiter(User.pending.count)})"], ' '), status: 'pending'
|
2017-12-13 22:15:10 +11:00
|
|
|
.filter-subset
|
|
|
|
%strong= t('admin.accounts.role')
|
|
|
|
%ul
|
2021-12-06 07:48:39 +11:00
|
|
|
%li= filter_link_to t('admin.accounts.moderation.all'), permissions: nil
|
|
|
|
%li= filter_link_to t('admin.accounts.roles.staff'), permissions: 'staff'
|
2020-03-09 01:39:13 +11:00
|
|
|
.filter-subset
|
|
|
|
%strong= t 'generic.order_by'
|
|
|
|
%ul
|
|
|
|
%li= filter_link_to t('relationships.most_recent'), order: nil
|
|
|
|
%li= filter_link_to t('relationships.last_active'), order: 'active'
|
2016-12-05 04:10:40 +11:00
|
|
|
|
2017-05-18 08:38:01 +10:00
|
|
|
= form_tag admin_accounts_url, method: 'GET', class: 'simple_form' do
|
2017-05-17 11:00:34 +10:00
|
|
|
.fields-group
|
2021-12-06 07:48:39 +11:00
|
|
|
- (AccountFilter::KEYS - %i(origin status permissions)).each do |key|
|
2017-05-17 11:00:34 +10:00
|
|
|
- if params[key].present?
|
|
|
|
= hidden_field_tag key, params[key]
|
|
|
|
|
2017-11-02 00:46:05 +11:00
|
|
|
- %i(username by_domain display_name email ip).each do |key|
|
2022-03-21 14:45:58 +11:00
|
|
|
- unless key == :by_domain && params[:origin] != 'remote'
|
2019-02-18 23:37:13 +11:00
|
|
|
.input.string.optional
|
|
|
|
= text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.accounts.#{key}")
|
2017-05-17 11:00:34 +10:00
|
|
|
|
|
|
|
.actions
|
2020-06-26 08:36:30 +10:00
|
|
|
%button.button= t('admin.accounts.search')
|
2017-05-18 08:38:01 +10:00
|
|
|
= link_to t('admin.accounts.reset'), admin_accounts_path, class: 'button negative'
|
2017-05-17 11:00:34 +10:00
|
|
|
|
2021-12-06 07:48:39 +11:00
|
|
|
= form_for(@form, url: batch_admin_accounts_path) do |f|
|
|
|
|
= hidden_field_tag :page, params[:page] || 1
|
|
|
|
|
|
|
|
- AccountFilter::KEYS.each do |key|
|
|
|
|
= hidden_field_tag key, params[key] if params[key].present?
|
|
|
|
|
|
|
|
.batch-table
|
|
|
|
.batch-table__toolbar
|
|
|
|
%label.batch-table__toolbar__select.batch-checkbox-all
|
|
|
|
= check_box_tag :batch_checkbox_all, nil, false
|
|
|
|
.batch-table__toolbar__actions
|
|
|
|
- if @accounts.any? { |account| account.user_pending? }
|
|
|
|
= 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') }
|
|
|
|
|
|
|
|
= f.button safe_join([fa_icon('lock'), t('admin.accounts.perform_full_suspension')]), name: :suspend, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
|
|
|
.batch-table__body
|
|
|
|
- if @accounts.empty?
|
|
|
|
= nothing_here 'nothing-here--under-tabs'
|
|
|
|
- else
|
|
|
|
= render partial: 'account', collection: @accounts, locals: { f: f }
|
2016-12-04 05:30:13 +11:00
|
|
|
|
2017-04-11 09:11:41 +10:00
|
|
|
= paginate @accounts
|