You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1.1 KiB

  1. - content_for :page_title do
  2. = t('admin.ip_blocks.title')
  3. - content_for :header_tags do
  4. = javascript_pack_tag 'admin', integrity: true, async: true, crossorigin: 'anonymous'
  5. - if can?(:create, :ip_block)
  6. - content_for :heading_actions do
  7. = link_to t('admin.ip_blocks.add_new'), new_admin_ip_block_path, class: 'button'
  8. = form_for(@form, url: batch_admin_ip_blocks_path) do |f|
  9. = hidden_field_tag :page, params[:page] || 1
  10. .batch-table
  11. .batch-table__toolbar
  12. %label.batch-table__toolbar__select.batch-checkbox-all
  13. = check_box_tag :batch_checkbox_all, nil, false
  14. .batch-table__toolbar__actions
  15. - if can?(:destroy, :ip_block)
  16. = f.button safe_join([fa_icon('times'), t('admin.ip_blocks.delete')]), name: :delete, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
  17. .batch-table__body
  18. - if @ip_blocks.empty?
  19. = nothing_here 'nothing-here--under-tabs'
  20. - else
  21. = render partial: 'ip_block', collection: @ip_blocks, locals: { f: f }
  22. = paginate @ip_blocks