Retrospring/app/views/shared/_question.html.haml

24 lines
987 B
Plaintext
Raw Normal View History

2020-05-10 01:02:04 -07:00
- type ||= nil
.card.questionbox{ data: { id: q.id } }
2020-05-10 01:02:04 -07:00
.card-body
.media
- if type == 'discover'
.pull-left
%a{ href: user_screen_name(q.user, link_only: true) }
2023-01-04 02:00:45 -08:00
%img.avatar-md.me-2{ src: q.user&.profile_picture&.url(:small), loading: :lazy }
2020-05-10 01:02:04 -07:00
.media-body
- if user_signed_in?
.pull-right
.btn-group
%button.btn.btn-link.btn-sm.dropdown-toggle{ data: { bs_toggle: :dropdown }, aria: { expanded: false } }
2020-05-10 01:02:04 -07:00
%span.caret
= render "actions/question", question: q
2020-05-10 01:02:04 -07:00
%h6.media-heading.text-muted.answerbox__question-user
= t("answerbox.header.asked_html", user: user_screen_name(q.user), time: time_tooltip(q))
2020-05-10 01:02:04 -07:00
- if q.answer_count > 1
·
%a{ href: question_path(q.user.screen_name, q.id) }
2022-07-30 09:50:46 -07:00
= pluralize(q.answer_count, t("voc.answer"))
.answerbox__question-text
= question_markdown q.content