index.html.haml 960 B

123456789101112131415161718192021222324
  1. - content_for :page_title do
  2. = t('admin.ip_blocks.title')
  3. - if can?(:create, :ip_block)
  4. - content_for :heading_actions do
  5. = link_to t('admin.ip_blocks.add_new'), new_admin_ip_block_path, class: 'button'
  6. = form_for(@form, url: batch_admin_ip_blocks_path) do |f|
  7. = hidden_field_tag :page, params[:page] || 1
  8. .batch-table
  9. .batch-table__toolbar
  10. %label.batch-table__toolbar__select.batch-checkbox-all
  11. = check_box_tag :batch_checkbox_all, nil, false
  12. .batch-table__toolbar__actions
  13. - if can?(:destroy, :ip_block)
  14. = 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') }
  15. .batch-table__body
  16. - if @ip_blocks.empty?
  17. = nothing_here 'nothing-here--under-tabs'
  18. - else
  19. = render partial: 'ip_block', collection: @ip_blocks, locals: { f: f }
  20. = paginate @ip_blocks