2020-05-10 22:27:39 +02:00
|
|
|
.card.question--fixed{ class: hidden ? 'question--hidden' : '', tabindex: hidden ? -1 : '', aria: { hidden: hidden } }
|
2015-05-12 20:48:06 +02:00
|
|
|
.container
|
2020-04-19 23:09:41 +02:00
|
|
|
.card-body
|
2023-01-04 16:12:43 +01:00
|
|
|
.d-flex
|
2015-05-12 20:48:06 +02:00
|
|
|
- unless question.author_is_anonymous
|
2023-01-04 16:12:43 +01:00
|
|
|
.flex-shrink-0
|
|
|
|
%a{ href: unless hidden then user_path(question.user) end }
|
|
|
|
%img.answerbox__question-user-avatar.avatar-md{ src: question.user.profile_picture.url(:small) }
|
|
|
|
.flex-grow-1
|
|
|
|
%h6.text-muted.answerbox__question-user
|
2022-06-27 00:36:00 +02:00
|
|
|
- identifier = question.author_is_anonymous ? question.author_identifier : nil
|
2015-05-27 04:40:11 +02:00
|
|
|
- if hidden
|
2022-06-27 00:36:00 +02:00
|
|
|
= user_screen_name question.user, author_identifier: identifier, url: false
|
2015-05-27 04:40:11 +02:00
|
|
|
- else
|
2022-08-17 22:18:37 +02:00
|
|
|
= t("answerbox.header.asked_html", user: user_screen_name(question.user, author_identifier: identifier), time: time_tooltip(question))
|
2023-01-15 13:26:25 +01:00
|
|
|
.answerbox__question-body{ data: { controller: question.long? ? "collapse" : nil } }
|
2023-01-12 18:27:30 +01:00
|
|
|
.answerbox__question-text{ class: question.long? ? "collapsed" : "", data: { collapse_target: "content" } }
|
|
|
|
= question_markdown question.content
|
|
|
|
- if question.long?
|
|
|
|
= render "shared/collapse", type: "question"
|
2023-01-04 16:12:43 +01:00
|
|
|
- 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
|
|
|
|
- unless hidden
|
|
|
|
= render "actions/question", question: question
|