2022-11-21 13:30:15 -08:00
|
|
|
.card.inbox-entry{ id: "inbox_#{i.id}", class: i.new? ? "inbox-entry--new" : "", data: { id: i.id } }
|
2020-04-19 14:09:41 -07:00
|
|
|
.card-header
|
2023-01-04 07:12:43 -08:00
|
|
|
.d-flex
|
2014-12-09 14:21:41 -08:00
|
|
|
- unless i.question.author_is_anonymous
|
2023-01-04 07:12:43 -08:00
|
|
|
.flex-shrink-0
|
|
|
|
%a.pull-left{ href: user_path(i.question.user) }
|
|
|
|
%img.answerbox__question-user-avatar.avatar-md{ src: i.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 i.question.author_is_anonymous
|
2023-01-03 08:16:06 -08:00
|
|
|
%i.fas.fa-user-secret{ title: t('.anon_hint') }
|
2022-06-26 15:36:00 -07:00
|
|
|
= t(".asked_html", user: user_screen_name(i.question.user, context_user: i.user, author_identifier: i.question.author_is_anonymous ? i.question.author_identifier : nil), time: time_tooltip(i.question))
|
2020-11-16 09:18:42 -08:00
|
|
|
- if !i.question.author_is_anonymous && i.question.answer_count.positive?
|
|
|
|
·
|
2022-07-23 03:06:05 -07:00
|
|
|
%a{ href: question_path(i.question.user.screen_name, i.question.id) }
|
2022-04-19 13:32:46 -07:00
|
|
|
= t(".answers", count: i.question.answer_count)
|
2023-01-15 04:26:25 -08:00
|
|
|
.answerbox__question-body{ data: { controller: i.question.long? ? "collapse" : nil } }
|
2023-01-12 09:27:30 -08:00
|
|
|
.answerbox__question-text{ class: i.question.long? ? "collapsed" : "", data: { collapse_target: "content" } }
|
|
|
|
= question_markdown i.question.content
|
|
|
|
- if i.question.long?
|
|
|
|
= render "shared/collapse", type: "question"
|
2022-12-17 18:21:25 -08:00
|
|
|
- if i.question.user_id != current_user.id || current_user.has_cached_role?(:administrator)
|
2023-01-04 07:12:43 -08:00
|
|
|
.flex-shrink-0.ms-auto
|
2021-08-11 13:38:53 -07:00
|
|
|
.btn-group
|
2023-01-04 03:23:47 -08:00
|
|
|
%button.btn.btn-default.btn-sm.dropdown-toggle{ data: { bs_toggle: :dropdown }, aria: { expanded: false } }
|
2021-08-11 13:38:53 -07:00
|
|
|
%span.caret
|
2022-08-21 06:04:54 -07:00
|
|
|
= render "actions/question", question: i.question
|
2022-06-19 15:59:47 -07:00
|
|
|
- if current_user == i.user
|
|
|
|
.card-body
|
2023-01-10 06:51:43 -08:00
|
|
|
%textarea.form-control.mb-3{ name: "ib-answer", placeholder: t(".placeholder"), data: { id: i.id } }
|
|
|
|
.d-sm-flex
|
|
|
|
%button.btn.btn-success.me-sm-1{ name: "ib-answer", data: { ib_id: i.id } }
|
|
|
|
= t("voc.answer")
|
|
|
|
%button.btn.btn-danger.me-sm-1{ name: "ib-destroy", data: { ib_id: i.id } }
|
|
|
|
= t("voc.delete")
|
|
|
|
%button.btn.btn-default.px-1{ name: "ib-options", data: { ib_id: i.id, state: :hidden } }
|
|
|
|
%i.fa.fa-chevron-down
|
|
|
|
%span.pe-none= t(".options")
|
2023-01-10 07:05:50 -08:00
|
|
|
%p.format-help.ms-auto.align-self-center.mt-2.mt-sm-0.text-center
|
2023-01-10 06:51:43 -08:00
|
|
|
= render "shared/format_link"
|
2022-06-19 15:59:47 -07:00
|
|
|
.card-footer.d-none{ id: "ib-options-#{i.id}" }
|
|
|
|
%h4= t(".sharing.heading")
|
2023-01-28 13:24:05 -08:00
|
|
|
- if services.count.positive?
|
2022-06-19 15:59:47 -07:00
|
|
|
.row
|
2023-01-28 13:24:05 -08:00
|
|
|
- services.each do |service|
|
2022-06-19 15:59:47 -07:00
|
|
|
.col-md-3.col-sm-4.col-xs-6
|
|
|
|
%label
|
|
|
|
%input{ type: "checkbox", name: "ib-share", checked: :checked, data: { ib_id: i.id, service: service.provider } }
|
|
|
|
= raw t(".sharing.post_to", service: service.provider.capitalize)
|
|
|
|
- else
|
|
|
|
%p= t(".sharing.none_html", settings: link_to(t(".sharing.settings"), services_path))
|