about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-12-23 00:04:52 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-12-23 00:04:52 +0100
commitb302b9202b17abe9834460acf589b512579766d6 (patch)
tree927362d8752727f32e93c733a7cba573608ede70 /app/views
parent3c841c73062a43a634ff7407ef3e6c84c5510c96 (diff)
Add page for authorizing/rejecting follow requests
Diffstat (limited to 'app/views')
-rw-r--r--app/views/about/index.html.haml1
-rw-r--r--app/views/accounts/_header.html.haml4
-rw-r--r--app/views/follow_requests/index.html.haml16
-rw-r--r--app/views/layouts/auth.html.haml3
-rw-r--r--app/views/settings/shared/_links.html.haml2
5 files changed, 24 insertions, 2 deletions
diff --git a/app/views/about/index.html.haml b/app/views/about/index.html.haml
index fe13de837..6dd182205 100644
--- a/app/views/about/index.html.haml
+++ b/app/views/about/index.html.haml
@@ -2,7 +2,6 @@
   = Rails.configuration.x.local_domain
 
 - content_for :header_tags do
-  = javascript_include_tag 'application_public'
   %meta{ property: 'og:site_name', content: 'Mastodon' }/
   %meta{ property: 'og:type', content: 'website' }/
   %meta{ property: 'og:title', content: Rails.configuration.x.local_domain }/
diff --git a/app/views/accounts/_header.html.haml b/app/views/accounts/_header.html.haml
index 77fd6c457..12c9b069d 100644
--- a/app/views/accounts/_header.html.haml
+++ b/app/views/accounts/_header.html.haml
@@ -9,7 +9,9 @@
   .avatar= image_tag @account.avatar.url( :original)
   %h1.name
     = display_name(@account)
-    %small= "@#{@account.username}"
+    %small
+      = "@#{@account.username}"
+      = fa_icon('lock') if @account.locked?
   .details
     .bio
       .account__header__content= Formatter.instance.simplified_format(@account)
diff --git a/app/views/follow_requests/index.html.haml b/app/views/follow_requests/index.html.haml
new file mode 100644
index 000000000..9db2d5c42
--- /dev/null
+++ b/app/views/follow_requests/index.html.haml
@@ -0,0 +1,16 @@
+- content_for :page_title do
+  = t('follow_requests.title')
+
+- if @follow_requests.empty?
+  %p.nothing-here= t('accounts.nothing_here')
+- else
+  %table.table
+    %tbody
+      - @follow_requests.each do |follow_request|
+        %tr
+          %td= link_to follow_request.account.acct, web_path("accounts/#{follow_request.account.id}")
+          %td
+            = table_link_to 'check-circle', t('follow_requests.authorize'), authorize_follow_request_path(follow_request), method: :post
+            = table_link_to 'times-circle', t('follow_requests.reject'), reject_follow_request_path(follow_request), method: :post
+
+.form-footer= render "settings/shared/links"
diff --git a/app/views/layouts/auth.html.haml b/app/views/layouts/auth.html.haml
index 1fa0b5ae0..db841d27a 100644
--- a/app/views/layouts/auth.html.haml
+++ b/app/views/layouts/auth.html.haml
@@ -1,3 +1,6 @@
+- content_for :header_tags do
+  = javascript_include_tag 'application_public'
+
 - content_for :content do
   .container
     .logo-container
diff --git a/app/views/settings/shared/_links.html.haml b/app/views/settings/shared/_links.html.haml
index 44f097950..b6a0b1fc1 100644
--- a/app/views/settings/shared/_links.html.haml
+++ b/app/views/settings/shared/_links.html.haml
@@ -1,6 +1,8 @@
 %ul.no-list
   - if controller_name != 'profiles'
     %li= link_to t('settings.edit_profile'), settings_profile_path
+  - if controller_name != 'follow_requests'
+    %li= link_to t('follow_requests.title'), follow_requests_path
   - if controller_name != 'preferences'
     %li= link_to t('settings.preferences'), settings_preferences_path
   - if controller_name != 'registrations'