about summary refs log tree commit diff
path: root/app/views/admin/action_logs/index.html.haml
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-04-05 00:16:23 +0200
committerGitHub <noreply@github.com>2020-04-05 00:16:23 +0200
commit6e426267a762f3cd1efa2c5fb120a13543567775 (patch)
tree2a71acb5433eece834df66c179e924eb34df38fb /app/views/admin/action_logs/index.html.haml
parent5c5317041f17375666bfaf4788f0adf71804b47d (diff)
parentec6464f8d0bba52e3bfb8f0afc9531ce80238000 (diff)
Merge pull request #1311 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/views/admin/action_logs/index.html.haml')
-rw-r--r--app/views/admin/action_logs/index.html.haml21
1 files changed, 20 insertions, 1 deletions
diff --git a/app/views/admin/action_logs/index.html.haml b/app/views/admin/action_logs/index.html.haml
index a4d3871a9..937664c4b 100644
--- a/app/views/admin/action_logs/index.html.haml
+++ b/app/views/admin/action_logs/index.html.haml
@@ -1,6 +1,25 @@
 - content_for :page_title do
   = t('admin.action_logs.title')
 
-= render @action_logs
+= form_tag admin_action_logs_url, method: 'GET', class: 'simple_form' do
+  = hidden_field_tag :target_account_id, params[:target_account_id] if params[:target_account_id].present?
+
+  .filters
+    .filter-subset.filter-subset--with-select
+      %strong= t('admin.action_logs.filter_by_user')
+      .input.select.optional
+        = select_tag :account_id, options_from_collection_for_select(Account.joins(:user).merge(User.staff), :id, :username, params[:account_id]), prompt: I18n.t('admin.accounts.moderation.all')
+
+    .filter-subset.filter-subset--with-select
+      %strong= t('admin.action_logs.filter_by_action')
+      .input.select.optional
+        = select_tag :action_type, options_for_select(Admin::ActionLogFilter::ACTION_TYPE_MAP.keys.map { |key| [I18n.t("admin.action_logs.action_types.#{key}"), key]}, params[:action_type]), prompt: I18n.t('admin.accounts.moderation.all')
+
+- if @action_logs.empty?
+  %div.muted-hint.center-text
+    = t 'admin.action_logs.empty'
+- else
+  .announcements-list
+    = render @action_logs
 
 = paginate @action_logs