0
0
Fork 0

Redesign public profiles and toots (#8068)

This commit is contained in:
Eugen Rochko 2018-07-28 19:25:33 +02:00 committed by GitHub
parent e23b26178a
commit bb71538bb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
93 changed files with 1388 additions and 1423 deletions

View file

@ -8,6 +8,7 @@ module AccountControllerConcern
included do
layout 'public'
before_action :set_account
before_action :set_instance_presenter
before_action :set_link_headers
before_action :check_account_suspension
end
@ -18,6 +19,10 @@ module AccountControllerConcern
@account = Account.find_local!(params[:account_username])
end
def set_instance_presenter
@instance_presenter = InstancePresenter.new
end
def set_link_headers
response.headers['Link'] = LinkHeader.new(
[

View file

@ -12,6 +12,7 @@ class StatusesController < ApplicationController
before_action :set_account
before_action :set_status
before_action :set_instance_presenter
before_action :set_link_headers
before_action :check_account_suspension
before_action :redirect_to_original, only: [:show]
@ -148,6 +149,10 @@ class StatusesController < ApplicationController
raise ActiveRecord::RecordNotFound
end
def set_instance_presenter
@instance_presenter = InstancePresenter.new
end
def check_account_suspension
gone if @account.suspended?
end