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.text-muted
- if current_user.profile.display_name.blank?
= t(".none")
- else
= current_user.profile.display_name
= current_user.profile.display_name.presence || t(".none")
%p.font-weight-bold.mb-0= t("activerecord.attributes.profile.description")
%p.text-muted
- if current_user.profile.description.blank?
= t(".none")
- else
= current_user.profile.description
= current_user.profile.description.presence || t(".none")
%p.font-weight-bold.mb-0= t("activerecord.attributes.profile.location")
%p.text-muted
- if current_user.profile.location.blank?
= t(".none")
- else
= current_user.profile.location
= current_user.profile.location.presence || t(".none")
%p.font-weight-bold.mb-0= t("activerecord.attributes.profile.website")
%p.text-muted
- if current_user.profile.website.blank?
= t(".none")
- else
= current_user.profile.website
= current_user.profile.website.presence || t(".none")
.col-md-6.col-sm-6.col-xs-12.mb-3
%h4= t(".section.pictures")
%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")
%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
%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.text-muted
- if current_user.locale.blank?
= t(".none")
- else
= current_user.locale
= current_user.locale.presence || t(".none")
%p.font-weight-bold.mb-0= t("activerecord.attributes.user.sign_in_count")
%p.text-muted= current_user.sign_in_count
@ -91,13 +77,13 @@
%h4= t(".section.sign_in")
%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.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.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
%h4= t(".section.create_update")
@ -105,7 +91,7 @@
%p.text-muted
- if 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
= t(".none")
@ -113,6 +99,6 @@
%p.text-muted
- if current_user.created_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
= t(".none")