index.html.haml 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. - content_for :page_title do
  2. = t('admin.invites.title')
  3. .filters
  4. .filter-subset
  5. %strong= t('admin.invites.filter.title')
  6. %ul
  7. %li= filter_link_to t('admin.invites.filter.all'), available: nil, expired: nil
  8. %li= filter_link_to t('admin.invites.filter.available'), available: 1, expired: nil
  9. %li= filter_link_to t('admin.invites.filter.expired'), available: nil, expired: 1
  10. %hr.spacer/
  11. - if policy(:invite).create?
  12. %p= t('invites.prompt')
  13. = simple_form_for(@invite, url: admin_invites_path) do |form|
  14. = render partial: 'invites/form', object: form
  15. %hr.spacer/
  16. .table-wrapper.simple_form
  17. %table.table.table--invites
  18. %thead
  19. %tr
  20. %th
  21. %th
  22. %th= t('invites.table.uses')
  23. %th= t('invites.table.expires_at')
  24. %th
  25. %tbody
  26. = render @invites
  27. = paginate @invites
  28. - if policy(:invite).deactivate_all?
  29. = link_to t('admin.invites.deactivate_all'), deactivate_all_admin_invites_path, method: :post, data: { confirm: t('admin.accounts.are_you_sure') }, class: 'button'