about summary refs log tree commit diff
path: root/app/views/admin/accounts/show.html.haml
blob: 22901aed1e4b97e105c28f101cf90bac8c955d32 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
- content_for :page_title do
  = @account.acct

%table.table
  %tbody
    %tr
      %th Username
      %td= @account.username
    %tr
      %th Domain
      %td= @account.domain
    %tr
      %th Display name
      %td= @account.display_name

    - if @account.local?
      %tr
        %th E-mail
        %td= @account.user.email
      %tr
        %th Most recent IP
        %td= @account.user.current_sign_in_ip
      %tr
        %th Most recent activity
        %td
          - if @account.user.current_sign_in_at
            = l @account.user.current_sign_in_at
          - else
            Never
    - else
      %tr
        %th Profile URL
        %td= link_to @account.url
      %tr
        %th Feed URL
        %td= link_to @account.remote_url
      %tr
        %th PuSH subscription expires
        %td
          - if @account.subscribed?
            = l @account.subscription_expires_at
          - else
            Not subscribed
      %tr
        %th Salmon URL
        %td= link_to @account.salmon_url

    %tr
      %th Follows
      %td= @account.following_count
    %tr
      %th Followers
      %td= @account.followers_count
    %tr
      %th Statuses
      %td= @account.statuses_count
    %tr
      %th Media attachments
      %td
        = @account.media_attachments.count
        = surround '(', ')' do
          = number_to_human_size @account.media_attachments.sum('file_file_size')

- if @account.silenced?
  = link_to 'Undo silence', admin_account_silence_path(@account.id), method: :delete, class: 'button'
- else
  = link_to 'Silence', admin_account_silence_path(@account.id), method: :post, class: 'button'

- if @account.suspended?
  = link_to 'Undo suspension', admin_account_suspension_path(@account.id), method: :delete, class: 'button'
- else
  = link_to 'Perform full suspension', admin_account_suspension_path(@account.id), method: :post, data: { confirm: 'Are you sure?' }, class: 'button'