2020-04-26 08:13:31 -07:00
|
|
|
.card-header
|
2023-01-04 07:12:43 -08:00
|
|
|
.d-flex
|
2020-04-26 08:13:31 -07:00
|
|
|
- unless a.question.author_is_anonymous
|
2023-01-04 07:12:43 -08:00
|
|
|
.flex-shrink-0
|
|
|
|
%a{ href: user_path(a.question.user) }
|
2023-10-20 02:45:53 -07:00
|
|
|
= render AvatarComponent.new(user: a.question.user, size: "md", classes: ["answerbox__question-user-avatar"])
|
2023-01-04 07:12:43 -08:00
|
|
|
.flex-grow-1
|
|
|
|
%h6.text-muted.answerbox__question-user
|
2022-06-21 09:18:09 -07:00
|
|
|
- if a.question.author_is_anonymous
|
2023-01-03 08:16:06 -08:00
|
|
|
%i.fas.fa-user-secret{ title: t(".anon_hint") }
|
2022-08-17 13:18:37 -07:00
|
|
|
= 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))
|
2021-08-11 07:56:58 -07:00
|
|
|
- if !a.question.author_is_anonymous && !a.question.direct
|
2020-11-16 09:18:42 -08:00
|
|
|
·
|
2023-03-05 08:29:18 -08:00
|
|
|
%a{ href: question_path(a.question.user.screen_name, a.question.id), data: { selection_hotkey: "a" } }
|
2022-07-30 13:45:40 -07:00
|
|
|
= t(".answers", count: a.question.answer_count)
|
2023-01-15 04:26:25 -08:00
|
|
|
.answerbox__question-body{ data: { controller: a.question.long? ? "collapse" : nil } }
|
2023-01-12 09:44:49 -08:00
|
|
|
.answerbox__question-text{ class: a.question.long? && !display_all ? "collapsed" : "", data: { collapse_target: "content" } }
|
2023-01-12 09:27:30 -08:00
|
|
|
= question_markdown a.question.content
|
2023-01-12 09:44:49 -08:00
|
|
|
- if a.question.long? && !display_all
|
2023-01-12 09:27:30 -08:00
|
|
|
= render "shared/collapse", type: "question"
|
2023-01-04 07:12:43 -08: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
|
|
|
|
= render "actions/question", question: a.question
|