]> cat aescling's git repositories - mastodon.git/commitdiff
Fix missing "Administered by" when timeline preview disabled (#7161)
authorEugen Rochko <eugen@zeonfederated.com>
Tue, 17 Apr 2018 11:51:14 +0000 (13:51 +0200)
committerGitHub <noreply@github.com>
Tue, 17 Apr 2018 11:51:14 +0000 (13:51 +0200)
app/views/about/_administration.html.haml [new file with mode: 0644]
app/views/about/show.html.haml

diff --git a/app/views/about/_administration.html.haml b/app/views/about/_administration.html.haml
new file mode 100644 (file)
index 0000000..ec5834f
--- /dev/null
@@ -0,0 +1,19 @@
+.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)
+          %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'
index 12213cda298d085b9dd591c6ac33aa80c90bfd20..870dafdf520fcfd0421665ba623c01880c64b43b 100644 (file)
                 %p= t 'about.about_mastodon_html'
               %div.contact
                 %h3= t 'about.administered_by'
-
-                .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)
-                          %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'
+                = render 'administration'
 
             = render 'features'
 
       - else
         .column-4.non-preview.landing-page__information
           .landing-page__features
-            %h3= t 'about.what_is_mastodon'
-            %p= t 'about.about_mastodon_html'
+            .features-list
+              %div
+                %h3= t 'about.what_is_mastodon'
+                %p= t 'about.about_mastodon_html'
+              %div.contact
+                %h3= t 'about.administered_by'
+                = render 'administration'
 
             = render 'features'