2020-04-26 08:13:31 -07:00
|
|
|
.card-header
|
2020-05-02 11:35:28 -07:00
|
|
|
.media
|
2020-04-26 08:13:31 -07:00
|
|
|
- unless a.question.author_is_anonymous
|
2022-07-23 03:06:05 -07:00
|
|
|
%a.pull-left{ href: user_path(a.question.user) }
|
2020-05-10 05:22:04 -07:00
|
|
|
%img.answerbox__question-user-avatar.avatar-md{ src: a.question.user.profile_picture.url(:medium) }
|
2020-05-02 11:35:28 -07:00
|
|
|
.media-body
|
2020-04-26 08:13:31 -07:00
|
|
|
- if user_signed_in?
|
|
|
|
.pull-right
|
|
|
|
.btn-group
|
2020-05-10 05:22:04 -07:00
|
|
|
%button.btn.btn-link.btn-sm.dropdown-toggle{ data: { toggle: :dropdown }, aria: { expanded: false } }
|
2020-04-26 08:13:31 -07:00
|
|
|
%span.caret
|
2020-05-10 05:22:04 -07:00
|
|
|
.dropdown-menu.dropdown-menu-right{ role: :menu }
|
|
|
|
- if current_user.mod? || a.question.user == current_user
|
2022-07-30 13:47:18 -07:00
|
|
|
%a.dropdown-item.text-danger{ href: "#", tabindex: -1, data: { action: "ab-question-destroy", q_id: a.question.id } }
|
2020-04-26 08:13:31 -07:00
|
|
|
%i.fa.fa-trash-o
|
2022-07-30 09:50:46 -07:00
|
|
|
= t("voc.delete")
|
2020-04-26 08:13:31 -07:00
|
|
|
- unless a.question.user == current_user
|
2022-07-30 13:47:18 -07:00
|
|
|
%a.dropdown-item{ href: "#", tabindex: -1, data: { action: "ab-question-report", q_id: a.question.id } }
|
2020-04-26 08:13:31 -07:00
|
|
|
%i.fa.fa-exclamation-triangle
|
2022-07-30 09:50:46 -07:00
|
|
|
= t("voc.report")
|
2021-08-05 09:31:35 -07:00
|
|
|
- if current_user.has_role? :administrator
|
2022-07-30 13:47:18 -07:00
|
|
|
%a.dropdown-item{ href: rails_admin_path_for_resource(a.question), target: "_blank" }
|
2021-08-05 09:31:35 -07:00
|
|
|
%i.fa.fa-gears
|
2022-07-30 09:50:46 -07:00
|
|
|
= t("voc.view_in_rails_admin")
|
2020-05-02 11:35:28 -07:00
|
|
|
%h6.text-muted.media-heading.answerbox__question-user
|
2022-06-21 09:18:09 -07:00
|
|
|
- if a.question.author_is_anonymous
|
2022-07-30 13:47:18 -07:00
|
|
|
%i.fa.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
|
|
|
·
|
2022-07-23 03:06:05 -07:00
|
|
|
%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)
|
2020-05-02 11:35:28 -07:00
|
|
|
.answerbox__question-text
|
2021-12-30 08:59:44 -08:00
|
|
|
= question_markdown a.question.content
|