Update /terms and /about/more to use public layout (#8142)
parent
f2404de871
commit
0dcc1950d1
@ -1,19 +0,0 @@ |
|||||||
.account |
|
||||||
.account__wrapper |
|
||||||
- if @instance_presenter.contact_account |
|
||||||
= link_to TagManager.instance.url_for(@instance_presenter.contact_account), class: 'account__display-name' do |
|
||||||
.account__avatar-wrapper |
|
||||||
.account__avatar{ style: "background-image: url(#{@instance_presenter.contact_account.avatar.url})" } |
|
||||||
%span.display-name |
|
||||||
%bdi |
|
||||||
%strong.display-name__html.emojify= display_name(@instance_presenter.contact_account, custom_emojify: true) |
|
||||||
%span.display-name__account @#{@instance_presenter.contact_account.acct} |
|
||||||
- else |
|
||||||
.account__display-name |
|
||||||
.account__avatar-wrapper |
|
||||||
.account__avatar{ style: "background-image: url(#{full_asset_url('avatars/original/missing.png', skip_pipeline: true)})" } |
|
||||||
%span.display-name |
|
||||||
%strong= t 'about.contact_missing' |
|
||||||
%span.display-name__account= t 'about.contact_unavailable' |
|
||||||
|
|
||||||
= link_to t('about.learn_more'), about_more_path, class: 'button button-alternative' |
|
@ -1,22 +0,0 @@ |
|||||||
.panel |
|
||||||
.panel-header |
|
||||||
= succeed ':' do |
|
||||||
= t 'about.contact' |
|
||||||
- if contact.site_contact_email.present? |
|
||||||
= mail_to contact.site_contact_email, nil, title: contact.site_contact_email |
|
||||||
- else |
|
||||||
%span= t 'about.contact_unavailable' |
|
||||||
.panel-body |
|
||||||
- if contact.contact_account |
|
||||||
.owner |
|
||||||
.avatar= image_tag contact.contact_account.avatar.url |
|
||||||
.name |
|
||||||
= link_to TagManager.instance.url_for(contact.contact_account) do |
|
||||||
%span.display_name.emojify= display_name(contact.contact_account, custom_emojify: true) |
|
||||||
%span.username @#{contact.contact_account.acct} |
|
||||||
- else |
|
||||||
.owner |
|
||||||
.avatar= image_tag full_asset_url('avatars/original/missing.png', skip_pipeline: true) |
|
||||||
.name |
|
||||||
%span.display_name= t 'about.contact_missing' |
|
||||||
%span.username= t 'about.contact_unavailable' |
|
@ -1,11 +1,9 @@ |
|||||||
- content_for :page_title do |
- content_for :page_title do |
||||||
= t('terms.title', instance: site_hostname) |
= t('terms.title', instance: site_hostname) |
||||||
|
|
||||||
.landing-page |
.grid |
||||||
.header-wrapper.compact |
.column-0 |
||||||
.header |
.box-widget |
||||||
= render 'links' |
.rich-formatting= @instance_presenter.site_terms.html_safe.presence || t('terms.body_html') |
||||||
|
.column-1 |
||||||
.extended-description |
= render 'application/sidebar' |
||||||
.container-alt |
|
||||||
= @instance_presenter.site_terms.html_safe.presence || t('terms.body_html') |
|
||||||
|
@ -1,35 +0,0 @@ |
|||||||
# frozen_string_literal: true |
|
||||||
|
|
||||||
require 'rails_helper' |
|
||||||
|
|
||||||
describe 'about/_contact.html.haml' do |
|
||||||
describe 'the contact account', without_verify_partial_doubles: true do |
|
||||||
before do |
|
||||||
allow(view).to receive(:display_name).and_return('Display Name!') |
|
||||||
end |
|
||||||
|
|
||||||
it 'shows info when account is present' do |
|
||||||
account = Account.new(username: 'admin') |
|
||||||
contact = double(contact_account: account, site_contact_email: '') |
|
||||||
render 'about/contact', contact: contact |
|
||||||
|
|
||||||
expect(rendered).to have_content('@admin') |
|
||||||
end |
|
||||||
|
|
||||||
it 'does not show info when account is missing' do |
|
||||||
contact = double(contact_account: nil, site_contact_email: '') |
|
||||||
render 'about/contact', contact: contact |
|
||||||
|
|
||||||
expect(rendered).not_to have_content('@') |
|
||||||
end |
|
||||||
end |
|
||||||
|
|
||||||
describe 'the contact email' do |
|
||||||
it 'show info when email is present' do |
|
||||||
contact = double(site_contact_email: 'admin@example.com', contact_account: nil) |
|
||||||
render 'about/contact', contact: contact |
|
||||||
|
|
||||||
expect(rendered).to have_content('admin@example.com') |
|
||||||
end |
|
||||||
end |
|
||||||
end |
|
Loading…
Reference in new issue