about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-12-04 18:10:40 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-12-04 18:10:40 +0100
commit9d9f796130407c6dc68118949537235faf25fcb9 (patch)
tree087b899593aa034880d806321c7c119cca9a2676 /app/views
parentd236dcded20b1a561b1f396fbb423811f27c77e5 (diff)
Adding more to admin accounts UI
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin/accounts/index.html.haml20
-rw-r--r--app/views/admin/accounts/show.html.haml34
2 files changed, 52 insertions, 2 deletions
diff --git a/app/views/admin/accounts/index.html.haml b/app/views/admin/accounts/index.html.haml
index 32474c2a4..a074f0ad9 100644
--- a/app/views/admin/accounts/index.html.haml
+++ b/app/views/admin/accounts/index.html.haml
@@ -1,20 +1,36 @@
+%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 'Most recent', admin_accounts_path(recent: '1')
+
 %table.table
   %thead
     %tr
       %th Username
       %th Domain
       %th Subscribed
+      %th Silenced
+      %th
   %tbody
     - @accounts.each do |account|
       %tr
         %td= account.username
-        %td= account.domain
-        %th
+        %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= link_to 'Edit', admin_account_path(account.id)
 
 = will_paginate @accounts, pagination_options
diff --git a/app/views/admin/accounts/show.html.haml b/app/views/admin/accounts/show.html.haml
index e69de29bb..02f7dcfe9 100644
--- a/app/views/admin/accounts/show.html.haml
+++ b/app/views/admin/accounts/show.html.haml
@@ -0,0 +1,34 @@
+%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 Current IP
+        %td= @account.user.current_sign_in_ip
+    - else
+      %tr
+        %th Profile URL
+        %td= link_to @account.url
+      %tr
+        %th Feed URL
+        %td= link_to @account.remote_url
+
+= simple_form_for @account, url: admin_account_path(@account.id) do |f|
+  = render 'shared/error_messages', object: @account
+
+  = f.input :silenced, as: :boolean, wrapper: :with_label
+
+  .actions
+    = f.button :button, t('generic.save_changes'), type: :submit