Fix haml-lint nits

This commit is contained in:
Andreas Nedbal 2022-02-19 00:48:14 +01:00 committed by Andreas Nedbal
parent edf3d3db15
commit e26d981105
1 changed files with 12 additions and 26 deletions

View File

@ -13,31 +13,20 @@
%p.font-weight-bold.mb-0= t("activerecord.attributes.profile.display_name") %p.font-weight-bold.mb-0= t("activerecord.attributes.profile.display_name")
%p.text-muted %p.text-muted
- if current_user.profile.display_name.blank? = current_user.profile.display_name.presence || t(".none")
= t(".none")
- else
= current_user.profile.display_name
%p.font-weight-bold.mb-0= t("activerecord.attributes.profile.description") %p.font-weight-bold.mb-0= t("activerecord.attributes.profile.description")
%p.text-muted %p.text-muted
- if current_user.profile.description.blank? = current_user.profile.description.presence || t(".none")
= t(".none")
- else
= current_user.profile.description
%p.font-weight-bold.mb-0= t("activerecord.attributes.profile.location") %p.font-weight-bold.mb-0= t("activerecord.attributes.profile.location")
%p.text-muted %p.text-muted
- if current_user.profile.location.blank? = current_user.profile.location.presence || t(".none")
= t(".none")
- else
= current_user.profile.location
%p.font-weight-bold.mb-0= t("activerecord.attributes.profile.website") %p.font-weight-bold.mb-0= t("activerecord.attributes.profile.website")
%p.text-muted %p.text-muted
- if current_user.profile.website.blank? = current_user.profile.website.presence || t(".none")
= t(".none")
- else
= current_user.profile.website
.col-md-6.col-sm-6.col-xs-12.mb-3 .col-md-6.col-sm-6.col-xs-12.mb-3
%h4= t(".section.pictures") %h4= t(".section.pictures")
%p.font-weight-bold.mb-0= t(".pictures.profile_picture.heading") %p.font-weight-bold.mb-0= t(".pictures.profile_picture.heading")
@ -56,7 +45,7 @@
%a{ href: current_user.profile_picture.url(:original) }= t(".pictures.profile_picture.size.original") %a{ href: current_user.profile_picture.url(:original) }= t(".pictures.profile_picture.size.original")
%p.font-weight-bold.mb-0= t(".pictures.profile_header.heading") %p.font-weight-bold.mb-0= t(".pictures.profile_header.heading")
%img{ src: current_user.profile_header.url(:mobile), style: 'width: 100%' } %img{ src: current_user.profile_header.url(:mobile), style: "width: 100%" }
%p %p
%a{ href: current_user.profile_header.url(:mobile) }= t(".pictures.profile_header.size.mobile") %a{ href: current_user.profile_header.url(:mobile) }= t(".pictures.profile_header.size.mobile")
| |
@ -78,10 +67,7 @@
%p.font-weight-bold.mb-0= t("activerecord.attributes.user.locale") %p.font-weight-bold.mb-0= t("activerecord.attributes.user.locale")
%p.text-muted %p.text-muted
- if current_user.locale.blank? = current_user.locale.presence || t(".none")
= t(".none")
- else
= current_user.locale
%p.font-weight-bold.mb-0= t("activerecord.attributes.user.sign_in_count") %p.font-weight-bold.mb-0= t("activerecord.attributes.user.sign_in_count")
%p.text-muted= current_user.sign_in_count %p.text-muted= current_user.sign_in_count
@ -91,13 +77,13 @@
%h4= t(".section.sign_in") %h4= t(".section.sign_in")
%p.font-weight-bold.mb-0= t("activerecord.attributes.user.current_sign_in_at") %p.font-weight-bold.mb-0= t("activerecord.attributes.user.current_sign_in_at")
%p.text-muted= current_user.current_sign_in_at ? localize(current_user.current_sign_in_at) : 'Not set' %p.text-muted= current_user.current_sign_in_at ? localize(current_user.current_sign_in_at) : t(".none")
%p.font-weight-bold.mb-0= t("activerecord.attributes.user.last_sign_in_at") %p.font-weight-bold.mb-0= t("activerecord.attributes.user.last_sign_in_at")
%p.text-muted= current_user.last_sign_in_at ? localize(current_user.last_sign_in_at) : 'Not set' %p.text-muted= current_user.last_sign_in_at ? localize(current_user.last_sign_in_at) : t(".none")
%p.font-weight-bold.mb-0= t("activerecord.attributes.user.remember_created_at") %p.font-weight-bold.mb-0= t("activerecord.attributes.user.remember_created_at")
%p.text-muted= current_user.remember_created_at ? localize(current_user.remember_created_at) : 'Not set' %p.text-muted= current_user.remember_created_at ? localize(current_user.remember_created_at) : t(".none")
.col-md-6.col-sm-6.col-xs-12 .col-md-6.col-sm-6.col-xs-12
%h4= t(".section.create_update") %h4= t(".section.create_update")
@ -105,7 +91,7 @@
%p.text-muted %p.text-muted
- if current_user.created_at - if current_user.created_at
= localize(current_user.created_at) = localize(current_user.created_at)
= " (#{t("time.distance_ago", time: time_ago_in_words(current_user.created_at))})" = " (#{t('time.distance_ago', time: time_ago_in_words(current_user.created_at))})"
- else - else
= t(".none") = t(".none")
@ -113,6 +99,6 @@
%p.text-muted %p.text-muted
- if current_user.created_at - if current_user.created_at
= localize(current_user.updated_at) = localize(current_user.updated_at)
= " (#{t("time.distance_ago", time: time_ago_in_words(current_user.updated_at))})" = " (#{t('time.distance_ago', time: time_ago_in_words(current_user.updated_at))})"
- else - else
= t(".none") = t(".none")