about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin/accounts/index.html.haml5
-rw-r--r--app/views/admin/accounts/show.html.haml6
-rw-r--r--app/views/admin/instances/index.html.haml14
3 files changed, 23 insertions, 2 deletions
diff --git a/app/views/admin/accounts/index.html.haml b/app/views/admin/accounts/index.html.haml
index 91fddadf8..345f74f90 100644
--- a/app/views/admin/accounts/index.html.haml
+++ b/app/views/admin/accounts/index.html.haml
@@ -26,8 +26,9 @@
         = hidden_field_tag key, params[key]
 
     - %i(username by_domain display_name email ip).each do |key|
-      .input.string.optional
-        = text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.accounts.#{key}")
+      - unless key == :by_domain && params[:remote].blank?
+        .input.string.optional
+          = text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.accounts.#{key}")
 
     .actions
       %button= t('admin.accounts.search')
diff --git a/app/views/admin/accounts/show.html.haml b/app/views/admin/accounts/show.html.haml
index 280a834ba..7ac73bd07 100644
--- a/app/views/admin/accounts/show.html.haml
+++ b/app/views/admin/accounts/show.html.haml
@@ -166,6 +166,12 @@
       - else
         = link_to t('admin.accounts.perform_full_suspension'), new_admin_account_action_path(@account.id, type: 'suspend'), class: 'button button--destructive' if can?(:suspend, @account)
 
+      - unless @account.local?
+        - if DomainBlock.where(domain: @account.domain).exists?
+          = link_to t('admin.domain_blocks.undo'), admin_instance_path(@account.domain), class: 'button'
+        - else
+          = link_to t('admin.domain_blocks.add_new'), new_admin_domain_block_path(_domain: @account.domain), class: 'button button--destructive'
+
   %hr.spacer/
 
   - unless @warnings.empty?
diff --git a/app/views/admin/instances/index.html.haml b/app/views/admin/instances/index.html.haml
index ce35b5db4..235927140 100644
--- a/app/views/admin/instances/index.html.haml
+++ b/app/views/admin/instances/index.html.haml
@@ -11,6 +11,20 @@
   %div{ style: 'flex: 1 1 auto; text-align: right' }
     = link_to t('admin.domain_blocks.add_new'), new_admin_domain_block_path, class: 'button'
 
+= 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]
+
+    - %i(by_domain).each do |key|
+      .input.string.optional
+        = text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.instances.#{key}")
+
+    .actions
+      %button= t('admin.accounts.search')
+      = link_to t('admin.accounts.reset'), admin_instances_path, class: 'button negative'
+
 %hr.spacer/
 
 - @instances.each do |instance|