about summary refs log tree commit diff
path: root/app/views/admin/reports
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2020-01-20 15:55:03 +0100
committerGitHub <noreply@github.com>2020-01-20 15:55:03 +0100
commit6feafb8802b2759eb33968a70b6c1cb100bf3926 (patch)
tree5df6ee7f77b92dec9ab6e848ec663b9f4b5838c4 /app/views/admin/reports
parent06f6995860d507ac26f23722506420b5cdae2ffe (diff)
Various fixes and improvements (#12878)
* Fix unused role routes being generated

* Remove unused JavaScript code

* Refactor filters code to be DRYer

* Fix `.count == 0` comparisons to `.empty?` in views

* Fix filters in views
Diffstat (limited to 'app/views/admin/reports')
-rw-r--r--app/views/admin/reports/index.html.haml5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/views/admin/reports/index.html.haml b/app/views/admin/reports/index.html.haml
index 30c7549b0..0263b80fb 100644
--- a/app/views/admin/reports/index.html.haml
+++ b/app/views/admin/reports/index.html.haml
@@ -10,9 +10,8 @@
 
 = form_tag admin_reports_url, method: 'GET', class: 'simple_form' do
   .fields-group
-    - Admin::FilterHelper::REPORT_FILTERS.each do |key|
-      - if params[key].present?
-        = hidden_field_tag key, params[key]
+    - 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