2017-04-19 05:09:07 +10:00
|
|
|
- content_for :page_title do
|
|
|
|
= t('admin.instances.title')
|
|
|
|
|
2019-01-08 23:39:49 +11:00
|
|
|
.filters
|
|
|
|
.filter-subset
|
|
|
|
%strong= t('admin.instances.moderation.title')
|
|
|
|
%ul
|
|
|
|
%li= filter_link_to t('admin.instances.moderation.all'), limited: nil
|
2019-07-30 19:10:46 +10:00
|
|
|
|
|
|
|
- unless whitelist_mode?
|
|
|
|
%li= filter_link_to t('admin.instances.moderation.limited'), limited: '1'
|
2017-09-13 20:30:07 +10:00
|
|
|
|
2020-04-29 03:39:16 +10:00
|
|
|
%div.special-action-button
|
2019-07-30 19:10:46 +10:00
|
|
|
- if whitelist_mode?
|
|
|
|
= link_to t('admin.domain_allows.add_new'), new_admin_domain_allow_path, class: 'button'
|
|
|
|
- else
|
|
|
|
= link_to t('admin.domain_blocks.add_new'), new_admin_domain_block_path, class: 'button'
|
2017-09-13 20:30:07 +10:00
|
|
|
|
2019-07-30 19:10:46 +10:00
|
|
|
- unless whitelist_mode?
|
|
|
|
= form_tag admin_instances_url, method: 'GET', class: 'simple_form' do
|
|
|
|
.fields-group
|
2020-01-21 01:55:03 +11:00
|
|
|
- InstanceFilter::KEYS.each do |key|
|
|
|
|
= hidden_field_tag key, params[key] if params[key].present?
|
2019-02-19 00:59:19 +11:00
|
|
|
|
2019-07-30 19:10:46 +10:00
|
|
|
- %i(by_domain).each do |key|
|
|
|
|
.input.string.optional
|
|
|
|
= text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.instances.#{key}")
|
2019-02-19 00:59:19 +11:00
|
|
|
|
2019-07-30 19:10:46 +10:00
|
|
|
.actions
|
|
|
|
%button= t('admin.accounts.search')
|
|
|
|
= link_to t('admin.accounts.reset'), admin_instances_path, class: 'button negative'
|
2019-02-19 00:59:19 +11:00
|
|
|
|
2019-01-08 23:39:49 +11:00
|
|
|
%hr.spacer/
|
|
|
|
|
|
|
|
- @instances.each do |instance|
|
|
|
|
.directory__tag
|
|
|
|
= link_to admin_instance_path(instance) do
|
|
|
|
%h4
|
|
|
|
= instance.domain
|
|
|
|
%small
|
|
|
|
- if instance.domain_block
|
2019-06-22 08:39:09 +10:00
|
|
|
- first_item = true
|
2019-01-08 23:39:49 +11:00
|
|
|
- if !instance.domain_block.noop?
|
|
|
|
= t("admin.domain_blocks.severity.#{instance.domain_block.severity}")
|
2019-06-22 08:39:09 +10:00
|
|
|
- first_item = false
|
2019-09-04 06:53:27 +10:00
|
|
|
- unless instance.domain_block.suspend?
|
|
|
|
- if instance.domain_block.reject_media?
|
|
|
|
- unless first_item
|
|
|
|
•
|
|
|
|
= t('admin.domain_blocks.rejecting_media')
|
|
|
|
- first_item = false
|
|
|
|
- if instance.domain_block.reject_reports?
|
|
|
|
- unless first_item
|
|
|
|
•
|
|
|
|
= t('admin.domain_blocks.rejecting_reports')
|
2019-07-30 19:10:46 +10:00
|
|
|
- elsif whitelist_mode?
|
|
|
|
= t('admin.accounts.whitelisted')
|
2019-06-22 08:39:09 +10:00
|
|
|
- else
|
|
|
|
= t('admin.accounts.no_limits_imposed')
|
|
|
|
- if instance.countable?
|
|
|
|
.trends__item__current{ title: t('admin.instances.known_accounts', count: instance.accounts_count) }= number_to_human instance.accounts_count, strip_insignificant_zeros: true
|
2019-07-30 19:10:46 +10:00
|
|
|
|
2017-06-01 04:38:44 +10:00
|
|
|
= paginate paginated_instances
|