index.html.haml 1021 B

12345678910111213141516171819202122
  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. = form_for(@form, url: batch_admin_email_domain_blocks_path) do |f|
  6. = hidden_field_tag :page, params[:page] || 1
  7. .batch-table
  8. .batch-table__toolbar
  9. %label.batch-table__toolbar__select.batch-checkbox-all
  10. = check_box_tag :batch_checkbox_all, nil, false
  11. .batch-table__toolbar__actions
  12. = 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') }
  13. .batch-table__body
  14. - if @email_domain_blocks.empty?
  15. = nothing_here 'nothing-here--under-tabs'
  16. - else
  17. = render partial: 'email_domain_block', collection: @email_domain_blocks.flat_map { |x| [x, x.children.to_a].flatten }, locals: { f: f }
  18. = paginate @email_domain_blocks