about summary refs log tree commit diff
path: root/app/views/admin/accounts/index.html.haml
blob: a2a3628d67bfcbe6acf4e33f313b9cc3c9b2df28 (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
37
38
39
40
41
42
43
%ul.filters
  %li= link_to 'Local', admin_accounts_path(local: '1')
  %li= link_to 'Remote', admin_accounts_path(remote: '1')
  %li= link_to 'Silenced', admin_accounts_path(silenced: '1')
  %li= link_to 'Suspended', admin_accounts_path(suspended: '1')
  %li= link_to 'Most recent', admin_accounts_path(recent: '1')

%table.table
  %thead
    %tr
      %th Username
      %th Domain
      %th Subscribed
      %th Silenced
      %th Suspended
      %th
  %tbody
    - @accounts.each do |account|
      %tr
        %td= account.username
        %td
          - unless account.local?
            = link_to account.domain, admin_accounts_path(by_domain: account.domain)
        %td
          - if account.local?
            Local
          - elsif account.subscribed?
            %i.fa.fa-check
          - else
            %i.fa.fa-times
        %td
          - if account.silenced?
            %i.fa.fa-check
          - else
            %i.fa.fa-times
        %td
          - if account.suspended?
            %i.fa.fa-check
          - else
            %i.fa.fa-times
        %td= link_to 'Edit', admin_account_path(account.id)

= will_paginate @accounts, pagination_options