index.html.haml 1.1 KB

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