about summary refs log tree commit diff
path: root/app/views/admin
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-02-18 14:59:19 +0100
committerEugen Rochko <eugen@zeonfederated.com>2019-02-18 14:59:19 +0100
commit6840a77711b2d536b9227b5a96ec565117d80205 (patch)
tree086b2d8cc6d47b5aadcf3e887f9d998943808632 /app/views/admin
parent2f7f6af26a40fb9981c99d131cf021c71f24fb99 (diff)
Add domain search/filter to the "Federation" (/admin/instances) page (#10071)
Diffstat (limited to 'app/views/admin')
-rw-r--r--app/views/admin/instances/index.html.haml14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/views/admin/instances/index.html.haml b/app/views/admin/instances/index.html.haml
index ce35b5db4..2a5af3b5d 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_custom_emojis_path, class: 'button negative'
+
 %hr.spacer/
 
 - @instances.each do |instance|