diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2022-08-25 23:33:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-25 23:33:34 +0200 |
commit | 5b0e8cc92b9ca0ab0dc24366d95f67a88c470173 (patch) | |
tree | e25c081fa76f34436d859b1f9674287d790bc657 /app/views | |
parent | d696f729f1dc27c9d92b896c651e1ea73bf93d75 (diff) |
Add ability to select all accounts matching search for batch actions (#19053)
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/admin/accounts/index.html.haml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/views/admin/accounts/index.html.haml b/app/views/admin/accounts/index.html.haml index cb378f0ed..670a09a2d 100644 --- a/app/views/admin/accounts/index.html.haml +++ b/app/views/admin/accounts/index.html.haml @@ -37,6 +37,7 @@ = form_for(@form, url: batch_admin_accounts_path) do |f| = hidden_field_tag :page, params[:page] || 1 + = hidden_field_tag :select_all_matching, '0' - AccountFilter::KEYS.each do |key| = hidden_field_tag key, params[key] if params[key].present? @@ -52,6 +53,14 @@ = f.button safe_join([fa_icon('times'), t('admin.accounts.reject')]), name: :reject, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') } = f.button safe_join([fa_icon('lock'), t('admin.accounts.perform_full_suspension')]), name: :suspend, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') } + - if true || @accounts.total_count > @accounts.size + .batch-table__select-all + .not-selected.active + %span= t('generic.all_items_on_page_selected_html', count: @accounts.size) + %button{ type: 'button' }= t('generic.select_all_matching_items', count: @accounts.total_count) + .selected + %span= t('generic.all_matching_items_selected_html', count: @accounts.total_count) + %button{ type: 'button' }= t('generic.deselect') .batch-table__body - if @accounts.empty? = nothing_here 'nothing-here--under-tabs' |