]> cat aescling's git repositories - mastodon.git/commitdiff
Do not create empty a element when there is no e-mail (#4455)
authorYamagishi Kazutoshi <ykzts@desire.sh>
Sun, 30 Jul 2017 14:24:18 +0000 (23:24 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Sun, 30 Jul 2017 14:24:18 +0000 (16:24 +0200)
Empty a element is created when there is no business e-mail input.

app/javascript/styles/about.scss
app/views/about/_contact.html.haml

index 1c5f13e329b89d874e0e58ffbd01c7b5b0fe1b0a..d409c821495ae7017bae0dc6c5a33b959ff19e9b 100644 (file)
       white-space: nowrap;
       overflow: hidden;
 
-      a {
+      a,
+      span {
         font-weight: 400;
         color: lighten($ui-base-color, 34%);
+      }
+
+      a {
         text-decoration: none;
       }
     }
index 81b7db61f473155dbae432657af5d32fed026b07..cf21ad5a3c1c88bd1242b7943385750d178b5bd6 100644 (file)
@@ -2,7 +2,10 @@
   .panel-header
     = succeed ':' do
       = t 'about.contact'
-    = mail_to contact.site_contact_email.presence, nil, :title => contact.site_contact_email.presence
+    - 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