Retrospring/app/views/answerbox/_header.html.haml

27 lines
1.5 KiB
Plaintext
Raw Normal View History

2020-04-26 08:13:31 -07:00
.card-header
.d-flex
2020-04-26 08:13:31 -07:00
- unless a.question.author_is_anonymous
.flex-shrink-0
%a{ href: user_path(a.question.user) }
%img.answerbox__question-user-avatar.avatar-md{ src: a.question.user.profile_picture.url(:small), loading: :lazy }
.flex-grow-1
%h6.text-muted.answerbox__question-user
2022-06-21 09:18:09 -07:00
- if a.question.author_is_anonymous
%i.fas.fa-user-secret{ title: t(".anon_hint") }
= t(".asked_html", user: user_screen_name(a.question.user, context_user: a.user, author_identifier: a.question.author_is_anonymous ? a.question.author_identifier: nil), time: time_tooltip(a.question))
- if !a.question.author_is_anonymous && !a.question.direct
·
%a{ href: question_path(a.question.user.screen_name, a.question.id) }
2022-07-30 13:45:40 -07:00
= t(".answers", count: a.question.answer_count)
.answerbox__question-body{ data: { controller: a.question.long? ? "collapse" : nil } }
.answerbox__question-text{ class: a.question.long? && !display_all ? "collapsed" : "", data: { collapse_target: "content" } }
= question_markdown a.question.content
- if a.question.long? && !display_all
= render "shared/collapse", type: "question"
- if user_signed_in?
.flex-shrink-0.ms-auto
.btn-group
%button.btn.btn-link.btn-sm.dropdown-toggle{ data: { bs_toggle: :dropdown }, aria: { expanded: false } }
%span.caret
= render "actions/question", question: a.question