about summary refs log tree commit diff
path: root/app/helpers/admin
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-12-13 13:42:10 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-12-13 13:42:10 +0100
commit76ec90799352603406728cb51b4e70913413f2bd (patch)
treeb6ab2aa6e04d99c89f0a8ac6442170ca539ba6b8 /app/helpers/admin
parent668013265c3153383088d9dd53970ae837c1d405 (diff)
Improved admin UI
Diffstat (limited to 'app/helpers/admin')
-rw-r--r--app/helpers/admin/accounts_helper.rb13
-rw-r--r--app/helpers/admin/domain_blocks_helper.rb4
-rw-r--r--app/helpers/admin/pubsubhubbub_helper.rb2
3 files changed, 19 insertions, 0 deletions
diff --git a/app/helpers/admin/accounts_helper.rb b/app/helpers/admin/accounts_helper.rb
index 5b9cbbacd..57cd972fa 100644
--- a/app/helpers/admin/accounts_helper.rb
+++ b/app/helpers/admin/accounts_helper.rb
@@ -1,2 +1,15 @@
+# frozen_string_literal: true
+
 module Admin::AccountsHelper
+  def filter_params(more_params)
+    params.permit(:local, :remote, :by_domain, :silenced, :suspended, :recent).merge(more_params)
+  end
+
+  def filter_link_to(text, more_params)
+    link_to text, filter_params(more_params), class: params.merge(more_params).compact == params.compact ? 'selected' : ''
+  end
+
+  def table_link_to(icon, text, path)
+    link_to safe_join([fa_icon(icon), text]), path, class: 'table-action-link'
+  end
 end
diff --git a/app/helpers/admin/domain_blocks_helper.rb b/app/helpers/admin/domain_blocks_helper.rb
new file mode 100644
index 000000000..d66c8d5e1
--- /dev/null
+++ b/app/helpers/admin/domain_blocks_helper.rb
@@ -0,0 +1,4 @@
+# frozen_string_literal: true
+
+module Admin::DomainBlocksHelper
+end
diff --git a/app/helpers/admin/pubsubhubbub_helper.rb b/app/helpers/admin/pubsubhubbub_helper.rb
index 41c874a62..c2fc2e7da 100644
--- a/app/helpers/admin/pubsubhubbub_helper.rb
+++ b/app/helpers/admin/pubsubhubbub_helper.rb
@@ -1,2 +1,4 @@
+# frozen_string_literal: true
+
 module Admin::PubsubhubbubHelper
 end