about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/accounts/_grid_card.html.haml2
-rw-r--r--app/views/accounts/_header.html.haml13
-rw-r--r--app/views/api/v1/blocks/index.rabl2
-rw-r--r--app/views/api/v1/favourites/index.rabl2
-rw-r--r--app/views/api/v1/follow_requests/index.rabl2
-rw-r--r--app/views/authorize_follow/_card.html.haml11
-rw-r--r--app/views/authorize_follow/error.html.haml3
-rw-r--r--app/views/authorize_follow/new.html.haml12
-rw-r--r--app/views/follow_requests/index.html.haml16
-rw-r--r--app/views/layouts/admin.html.haml3
-rw-r--r--app/views/notification_mailer/follow_request.text.erb5
-rw-r--r--app/views/oauth/authorizations/error.html.haml5
-rw-r--r--app/views/oauth/authorizations/new.html.haml39
-rw-r--r--app/views/oauth/authorizations/show.html.haml5
-rw-r--r--app/views/remote_follow/new.html.haml13
-rw-r--r--app/views/settings/preferences/show.html.haml1
-rw-r--r--app/views/settings/shared/_links.html.haml2
-rw-r--r--app/views/xrd/webfinger.json.rabl3
-rw-r--r--app/views/xrd/webfinger.xml.ruby1
19 files changed, 92 insertions, 48 deletions
diff --git a/app/views/accounts/_grid_card.html.haml b/app/views/accounts/_grid_card.html.haml
index dfd7a9f5e..dfdb23161 100644
--- a/app/views/accounts/_grid_card.html.haml
+++ b/app/views/accounts/_grid_card.html.haml
@@ -1,6 +1,6 @@
 .account-grid-card
   .account-grid-card__header
-    .avatar= image_tag account.avatar.url( :original)
+    .avatar= image_tag account.avatar.url(:original)
     .name
       = link_to TagManager.instance.url_for(account) do
         %span.display_name= display_name(account)
diff --git a/app/views/accounts/_header.html.haml b/app/views/accounts/_header.html.haml
index 12c9b069d..1c6b5f0f6 100644
--- a/app/views/accounts/_header.html.haml
+++ b/app/views/accounts/_header.html.haml
@@ -5,8 +5,11 @@
         = link_to t('accounts.unfollow'), unfollow_account_path(@account), data: { method: :post }, class: 'button'
       - else
         = link_to t('accounts.follow'), follow_account_path(@account), data: { method: :post }, class: 'button'
-
-  .avatar= image_tag @account.avatar.url( :original)
+  - else
+    .controls
+      .remote-follow
+        = link_to t('accounts.remote_follow'), account_remote_follow_path(@account), class: 'button'
+  .avatar= image_tag @account.avatar.url(:original)
   %h1.name
     = display_name(@account)
     %small
@@ -20,12 +23,12 @@
       .counter{ class: active_nav_class(account_url(@account)) }
         = link_to account_url(@account) do
           %span.counter-label= t('accounts.posts')
-          %span.counter-number= @account.statuses.count
+          %span.counter-number= number_with_delimiter @account.statuses.count
       .counter{ class: active_nav_class(following_account_url(@account)) }
         = link_to following_account_url(@account) do
           %span.counter-label= t('accounts.following')
-          %span.counter-number= @account.following.count
+          %span.counter-number= number_with_delimiter @account.following.count
       .counter{ class: active_nav_class(followers_account_url(@account)) }
         = link_to followers_account_url(@account) do
           %span.counter-label= t('accounts.followers')
-          %span.counter-number= @account.followers.count
+          %span.counter-number= number_with_delimiter @account.followers.count
diff --git a/app/views/api/v1/blocks/index.rabl b/app/views/api/v1/blocks/index.rabl
new file mode 100644
index 000000000..9f3b13a53
--- /dev/null
+++ b/app/views/api/v1/blocks/index.rabl
@@ -0,0 +1,2 @@
+collection @accounts
+extends 'api/v1/accounts/show'
diff --git a/app/views/api/v1/favourites/index.rabl b/app/views/api/v1/favourites/index.rabl
new file mode 100644
index 000000000..44d29d91b
--- /dev/null
+++ b/app/views/api/v1/favourites/index.rabl
@@ -0,0 +1,2 @@
+collection @statuses
+extends 'api/v1/statuses/show'
diff --git a/app/views/api/v1/follow_requests/index.rabl b/app/views/api/v1/follow_requests/index.rabl
new file mode 100644
index 000000000..9f3b13a53
--- /dev/null
+++ b/app/views/api/v1/follow_requests/index.rabl
@@ -0,0 +1,2 @@
+collection @accounts
+extends 'api/v1/accounts/show'
diff --git a/app/views/authorize_follow/_card.html.haml b/app/views/authorize_follow/_card.html.haml
new file mode 100644
index 000000000..a9b02c746
--- /dev/null
+++ b/app/views/authorize_follow/_card.html.haml
@@ -0,0 +1,11 @@
+.account-card
+  .detailed-status__display-name
+    %div
+      = image_tag account.avatar.url(:original), alt: '', width: 48, height: 48, class: 'avatar'
+
+    %span.display-name
+      %strong= display_name(account)
+      %span= "@#{account.acct}"
+
+  - unless account.note.blank?
+    .account__header__content= Formatter.instance.simplified_format(account)
diff --git a/app/views/authorize_follow/error.html.haml b/app/views/authorize_follow/error.html.haml
new file mode 100644
index 000000000..88d33b68d
--- /dev/null
+++ b/app/views/authorize_follow/error.html.haml
@@ -0,0 +1,3 @@
+.form-container
+  .flash-message#error_explanation
+    = t('authorize_follow.error')
diff --git a/app/views/authorize_follow/new.html.haml b/app/views/authorize_follow/new.html.haml
new file mode 100644
index 000000000..95601253e
--- /dev/null
+++ b/app/views/authorize_follow/new.html.haml
@@ -0,0 +1,12 @@
+- content_for :page_title do
+  = t('authorize_follow.title', acct: @account.acct)
+
+.form-container
+  .follow-prompt
+    %h2= t('authorize_follow.prompt_html', self: current_account.username)
+
+    = render partial: 'card', locals: { account: @account }
+
+  = form_tag authorize_follow_path, method: :post, class: 'simple_form' do
+    = hidden_field_tag :acct, @account.acct
+    = button_tag t('authorize_follow.follow'), type: :submit
diff --git a/app/views/follow_requests/index.html.haml b/app/views/follow_requests/index.html.haml
deleted file mode 100644
index 8c83488de..000000000
--- a/app/views/follow_requests/index.html.haml
+++ /dev/null
@@ -1,16 +0,0 @@
-- 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{ style: 'text-align: right' }
-            = 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/admin.html.haml b/app/views/layouts/admin.html.haml
index 2fc116f45..11f76a1de 100644
--- a/app/views/layouts/admin.html.haml
+++ b/app/views/layouts/admin.html.haml
@@ -1,3 +1,6 @@
+- content_for :header_tags do
+  = javascript_include_tag 'application_public'
+  
 - content_for :content do
   .admin-wrapper
     .sidebar
diff --git a/app/views/notification_mailer/follow_request.text.erb b/app/views/notification_mailer/follow_request.text.erb
new file mode 100644
index 000000000..c0d38ec67
--- /dev/null
+++ b/app/views/notification_mailer/follow_request.text.erb
@@ -0,0 +1,5 @@
+<%= display_name(@me) %>,
+
+<%= t('notification_mailer.follow_request.body', name: @account.acct) %>
+
+<%= web_url("follow_requests") %>
diff --git a/app/views/oauth/authorizations/error.html.haml b/app/views/oauth/authorizations/error.html.haml
index ee72d9740..408ca2b86 100644
--- a/app/views/oauth/authorizations/error.html.haml
+++ b/app/views/oauth/authorizations/error.html.haml
@@ -1,2 +1,3 @@
-.flash-message#error_explanation
-  = @pre_auth.error_response.body[:error_description]
+.form-container
+  .flash-message#error_explanation
+    = @pre_auth.error_response.body[:error_description]
diff --git a/app/views/oauth/authorizations/new.html.haml b/app/views/oauth/authorizations/new.html.haml
index f058e2cce..1f951c272 100644
--- a/app/views/oauth/authorizations/new.html.haml
+++ b/app/views/oauth/authorizations/new.html.haml
@@ -1,25 +1,26 @@
 - content_for :page_title do
   = t('doorkeeper.authorizations.new.title')
 
-.oauth-prompt
-  %h2= t('doorkeeper.authorizations.new.prompt', client_name: @pre_auth.client.name)
+.form-container
+  .oauth-prompt
+    %h2= t('doorkeeper.authorizations.new.prompt', client_name: @pre_auth.client.name)
 
-  %p
-    = t('doorkeeper.authorizations.new.able_to')
-    = @pre_auth.scopes.map { |scope| t(scope, scope: [:doorkeeper, :scopes]) }.map { |s| "<strong>#{s}</strong>"}.to_sentence.html_safe
+    %p
+      = t('doorkeeper.authorizations.new.able_to')
+      = @pre_auth.scopes.map { |scope| t(scope, scope: [:doorkeeper, :scopes]) }.map { |s| "<strong>#{s}</strong>"}.to_sentence.html_safe
 
-= form_tag oauth_authorization_path, method: :post, class: 'simple_form' do
-  = hidden_field_tag :client_id, @pre_auth.client.uid
-  = hidden_field_tag :redirect_uri, @pre_auth.redirect_uri
-  = hidden_field_tag :state, @pre_auth.state
-  = hidden_field_tag :response_type, @pre_auth.response_type
-  = hidden_field_tag :scope, @pre_auth.scope
-  = button_tag t('doorkeeper.authorizations.buttons.authorize'), type: :submit
+  = form_tag oauth_authorization_path, method: :post, class: 'simple_form' do
+    = hidden_field_tag :client_id, @pre_auth.client.uid
+    = hidden_field_tag :redirect_uri, @pre_auth.redirect_uri
+    = hidden_field_tag :state, @pre_auth.state
+    = hidden_field_tag :response_type, @pre_auth.response_type
+    = hidden_field_tag :scope, @pre_auth.scope
+    = button_tag t('doorkeeper.authorizations.buttons.authorize'), type: :submit
 
-= form_tag oauth_authorization_path, method: :delete, class: 'simple_form' do
-  = hidden_field_tag :client_id, @pre_auth.client.uid
-  = hidden_field_tag :redirect_uri, @pre_auth.redirect_uri
-  = hidden_field_tag :state, @pre_auth.state
-  = hidden_field_tag :response_type, @pre_auth.response_type
-  = hidden_field_tag :scope, @pre_auth.scope
-  = button_tag t('doorkeeper.authorizations.buttons.deny'), type: :submit, class: 'negative'
+  = form_tag oauth_authorization_path, method: :delete, class: 'simple_form' do
+    = hidden_field_tag :client_id, @pre_auth.client.uid
+    = hidden_field_tag :redirect_uri, @pre_auth.redirect_uri
+    = hidden_field_tag :state, @pre_auth.state
+    = hidden_field_tag :response_type, @pre_auth.response_type
+    = hidden_field_tag :scope, @pre_auth.scope
+    = button_tag t('doorkeeper.authorizations.buttons.deny'), type: :submit, class: 'negative'
diff --git a/app/views/oauth/authorizations/show.html.haml b/app/views/oauth/authorizations/show.html.haml
index 897a15cee..b56667f35 100644
--- a/app/views/oauth/authorizations/show.html.haml
+++ b/app/views/oauth/authorizations/show.html.haml
@@ -1,2 +1,3 @@
-.flash-message
-  %code= params[:code]
+.form-container
+  .flash-message
+    %code= params[:code]
diff --git a/app/views/remote_follow/new.html.haml b/app/views/remote_follow/new.html.haml
new file mode 100644
index 000000000..e88ccccce
--- /dev/null
+++ b/app/views/remote_follow/new.html.haml
@@ -0,0 +1,13 @@
+.form-container
+  .follow-prompt
+    %h2= t('remote_follow.prompt')
+
+    = render partial: 'authorize_follow/card', locals: { account: @account }
+
+  = simple_form_for @remote_follow, as: :remote_follow, url: account_remote_follow_path(@account) do |f|
+    = render 'shared/error_messages', object: @remote_follow
+
+    = f.input :acct, placeholder: t('remote_follow.acct')
+
+    .actions
+      = f.button :button, t('remote_follow.proceed'), type: :submit
diff --git a/app/views/settings/preferences/show.html.haml b/app/views/settings/preferences/show.html.haml
index db5b9fb48..a0860c94b 100644
--- a/app/views/settings/preferences/show.html.haml
+++ b/app/views/settings/preferences/show.html.haml
@@ -8,6 +8,7 @@
 
   = f.simple_fields_for :notification_emails, current_user.settings(:notification_emails) do |ff|
     = ff.input :follow, as: :boolean, wrapper: :with_label
+    = ff.input :follow_request, as: :boolean, wrapper: :with_label
     = ff.input :reblog, as: :boolean, wrapper: :with_label
     = ff.input :favourite, as: :boolean, wrapper: :with_label
     = ff.input :mention, as: :boolean, wrapper: :with_label
diff --git a/app/views/settings/shared/_links.html.haml b/app/views/settings/shared/_links.html.haml
index b6a0b1fc1..44f097950 100644
--- a/app/views/settings/shared/_links.html.haml
+++ b/app/views/settings/shared/_links.html.haml
@@ -1,8 +1,6 @@
 %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'
diff --git a/app/views/xrd/webfinger.json.rabl b/app/views/xrd/webfinger.json.rabl
index 0de17ac19..e637ed9d3 100644
--- a/app/views/xrd/webfinger.json.rabl
+++ b/app/views/xrd/webfinger.json.rabl
@@ -11,6 +11,7 @@ node(:links) do
     { rel: 'http://webfinger.net/rel/profile-page', type: 'text/html', href: TagManager.instance.url_for(@account) },
     { rel: 'http://schemas.google.com/g/2010#updates-from', type: 'application/atom+xml', href: account_url(@account, format: 'atom') },
     { rel: 'salmon', href: api_salmon_url(@account.id) },
-    { rel: 'magic-public-key', href: "data:application/magic-public-key,#{@magic_key}" }
+    { rel: 'magic-public-key', href: "data:application/magic-public-key,#{@magic_key}" },
+    { rel: 'http://ostatus.org/schema/1.0/subscribe', template: "#{authorize_follow_url}?acct={uri}" },
   ]
 end
diff --git a/app/views/xrd/webfinger.xml.ruby b/app/views/xrd/webfinger.xml.ruby
index ee5b5fc9d..80ac71d27 100644
--- a/app/views/xrd/webfinger.xml.ruby
+++ b/app/views/xrd/webfinger.xml.ruby
@@ -6,5 +6,6 @@ Nokogiri::XML::Builder.new do |xml|
     xml.Link(rel: 'http://schemas.google.com/g/2010#updates-from', type: 'application/atom+xml', href: account_url(@account, format: 'atom'))
     xml.Link(rel: 'salmon', href: api_salmon_url(@account.id))
     xml.Link(rel: 'magic-public-key', href: "data:application/magic-public-key,#{@magic_key}")
+    xml.Link(rel: 'http://ostatus.org/schema/1.0/subscribe', template: "#{authorize_follow_url}?acct={uri}")
   end
 end.to_xml