about summary refs log tree commit diff
path: root/app/views/admin/invites/index.html.haml
blob: ee6ba0f574255aea48bc229ced7d67d4f531268e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
- content_for :page_title do
  = t('admin.invites.title')

.filters
  .filter-subset
    %strong= t('admin.invites.filter.title')
    %ul
      %li= filter_link_to t('admin.invites.filter.all'), available: nil, expired: nil
      %li= filter_link_to t('admin.invites.filter.available'), available: 1, expired: nil
      %li= filter_link_to t('admin.invites.filter.expired'), available: nil, expired: 1

%hr.spacer/

- if policy(:invite).create?
  %p= t('invites.prompt')

  = render 'invites/form'

  %hr.spacer/

.table-wrapper.simple_form
  %table.table.table--invites
    %thead
      %tr
        %th
        %th
        %th= t('invites.table.uses')
        %th= t('invites.table.expires_at')
        %th
    %tbody
      = render @invites

= paginate @invites

- if policy(:invite).deactivate_all?
  = link_to t('admin.invites.deactivate_all'), deactivate_all_admin_invites_path, method: :post, data: { confirm: t('admin.accounts.are_you_sure') }, class: 'button'