index.html.haml 941 B

123456789101112131415161718192021222324252627282930313233343536
  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. = render 'invites/form'
  14. %hr.spacer/
  15. .table-wrapper
  16. %table.table
  17. %thead
  18. %tr
  19. %th
  20. %th= t('invites.table.uses')
  21. %th= t('invites.table.expires_at')
  22. %th
  23. %th
  24. %tbody
  25. = render @invites
  26. = paginate @invites
  27. - if policy(:invite).deactivate_all?
  28. = link_to t('admin.invites.deactivate_all'), deactivate_all_admin_invites_path, method: :post, data: { confirm: t('admin.accounts.are_you_sure') }, class: 'button'