Fix HAML codestyle in views

This commit is contained in:
Andreas Nedbal 2022-07-31 16:06:09 +02:00
parent 569f2e3458
commit 416bf19132
4 changed files with 16 additions and 16 deletions

View File

@ -1,12 +1,12 @@
- provide(:title, question_title(@question)) - provide(:title, question_title(@question))
= render 'question', question: @question, hidden: false = render "question", question: @question, hidden: false
= render 'question', question: @question, hidden: true = render "question", question: @question, hidden: true
.container.question-page .container.question-page
#answers #answers
- @answers.each do |a| - @answers.each do |a|
= render 'answerbox', a: a, show_question: false = render "answerbox", a: a, show_question: false
= render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @answers_last_id = render "shared/cursored_pagination_dummy", more_data_available: @more_data_available, last_id: @answers_last_id
- if @more_data_available - if @more_data_available
.d-flex.justify-content-center.justify-content-sm-start .d-flex.justify-content-center.justify-content-sm-start
@ -15,7 +15,7 @@
- if user_signed_in? && !current_user.answered?(@question) && current_user != @question.user && @question.user&.privacy_allow_stranger_answers - if user_signed_in? && !current_user.answered?(@question) && current_user != @question.user && @question.user&.privacy_allow_stranger_answers
.card#q-answer-box .card#q-answer-box
.card-header= t('.questionbox.title') .card-header= t(".questionbox.title")
.card-body .card-body
%textarea.form-control#q-answer-text{ placeholder: t("inbox.entry.placeholder"), data: { id: @question.id } } %textarea.form-control#q-answer-text{ placeholder: t("inbox.entry.placeholder"), data: { id: @question.id } }
%br/ %br/
@ -23,5 +23,5 @@
= t("voc.answer") = t("voc.answer")
- current_user.services.each do |service| - current_user.services.each do |service|
%label %label
%input{ type: 'checkbox', name: 'share', checked: :checked, data: { q_id: @question.id, service: service.provider } } %input{ type: "checkbox", name: "share", checked: :checked, data: { q_id: @question.id, service: service.provider } }
= t("inbox.entry.sharing.post_to", service: service.provider.capitalize) = t("inbox.entry.sharing.post_to", service: service.provider.capitalize)

View File

@ -18,4 +18,4 @@
%a{ href: user_path(member.user), title: member.user.screen_name, data: { toggle: :tooltip, placement: :top } } %a{ href: user_path(member.user), title: member.user.screen_name, data: { toggle: :tooltip, placement: :top } }
%img.avatar-xs{ src: member.user.profile_picture.url(:medium) } %img.avatar-xs{ src: member.user.profile_picture.url(:medium) }
= render 'shared/links' = render "shared/links"

View File

@ -1,9 +1,9 @@
.card .card
.list-group.list-group-horizontal-sm.text-center .list-group.list-group-horizontal-sm.text-center
= list_group_item t('.timeline'), timeline_path = list_group_item t(".timeline"), timeline_path
- if APP_CONFIG.dig(:features, :public, :enabled) - if APP_CONFIG.dig(:features, :public, :enabled)
= list_group_item t('.public'), public_timeline_path = list_group_item t(".public"), public_timeline_path
%a.list-group-item.list-group-item-action.dropdown.dropdown-toggle{ class: list ? 'active' : '', %a.list-group-item.list-group-item-action.dropdown.dropdown-toggle{ class: list ? "active" : "",
type: :button, data: { toggle: :dropdown }, aria: { haspopup: true, expanded: false } } type: :button, data: { toggle: :dropdown }, aria: { haspopup: true, expanded: false } }
- if list - if list
= list.display_name = list.display_name

View File

@ -13,28 +13,28 @@
- if user.banned? - if user.banned?
%span.badge.badge-dark %span.badge.badge-dark
%i.fa.fa-fw.fa-ban %i.fa.fa-fw.fa-ban
= t('.badge.banned') = t(".badge.banned")
- if user.following? current_user - if user.following? current_user
.badge.badge-light .badge.badge-light
= t('.badge.follows_you') = t(".badge.follows_you")
- if user_signed_in? && current_user.has_role?(:administrator) - if user_signed_in? && current_user.has_role?(:administrator)
- if user.has_role?(:administrator) - if user.has_role?(:administrator)
%span.badge.badge-danger %span.badge.badge-danger
%i.fa.fa-fw.fa-flask %i.fa.fa-fw.fa-flask
= t('.badge.admin') = t(".badge.admin")
- if user.has_role?(:moderator) - if user.has_role?(:moderator)
%span.badge.badge-success %span.badge.badge-success
%i.fa.fa-fw.fa-users %i.fa.fa-fw.fa-users
= t('.badge.moderator') = t(".badge.moderator")
- unless user.profile.description.blank? - unless user.profile.description.blank?
.profile__biography .profile__biography
= markdown user.profile.description = markdown user.profile.description
- unless user.profile.website.blank? - unless user.profile.website.blank?
.profile__website .profile__website
%i.fa.fa-fw.fa-globe %i.fa.fa-fw.fa-globe
%a{ href: user.profile.website, target: '_blank', rel: 'nofollow' }= user.profile.display_website %a{ href: user.profile.website, target: "_blank", rel: "nofollow" }= user.profile.display_website
- unless user.profile.location.blank? - unless user.profile.location.blank?
.profile__location .profile__location
%i.fa.fa-fw.fa-location-arrow %i.fa.fa-fw.fa-location-arrow
= user.profile.location = user.profile.location
= render 'user/actions', user: user, type: :follower = render "user/actions", user: user, type: :follower