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-10-20 15:27:36 -07:00
|
|
|
= render QuestionComponent.new(question: i.question, context_user: i.user)
|
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 } }
|
2023-10-29 15:45:19 -07:00
|
|
|
.d-flex.flex-column-reverse.flex-sm-row
|
|
|
|
%p.format-help.me-sm-auto.align-self-center.mb-0.mt-2.mt-sm-0.text-center
|
2023-01-10 06:51:43 -08:00
|
|
|
= render "shared/format_link"
|
2023-10-29 15:45:19 -07:00
|
|
|
.d-grid.gap-2.d-sm-block
|
|
|
|
%button.btn.btn-default.text-muted.me-sm-1.mb-sm-0{ name: "ib-destroy", data: { ib_id: i.id } }
|
|
|
|
%i.fa.fa-trash.fa-fw
|
|
|
|
= t("voc.delete")
|
|
|
|
%button.btn.btn-primary.grid-row-1{ name: "ib-answer", data: { ib_id: i.id } }
|
|
|
|
= t("voc.answer")
|
2023-02-05 10:49:06 -08:00
|
|
|
- if current_user.sharing_enabled
|
2023-02-05 11:18:51 -08:00
|
|
|
.inbox-entry__sharing.text-center.p-2.justify-content-center.d-none{
|
|
|
|
data: { controller: "inbox-sharing", inbox_sharing_config_value: "{}", inbox_sharing_auto_close_value: current_user.sharing_autoclose.to_s } }
|
2023-02-05 10:49:06 -08:00
|
|
|
%button.btn-close.inbox-entry__close{ data: { action: "inbox-sharing#close" } }
|
|
|
|
%span.visually-hidden= t("voc.close")
|
2023-02-05 11:18:51 -08:00
|
|
|
.align-self-center
|
2023-02-05 10:49:06 -08:00
|
|
|
%p.fs-3.fw-bold= t(".sharing.heading")
|
|
|
|
%p
|
|
|
|
%a.btn.btn-primary{ href: "https://twitter.com/intent/tweet?text=", data: { inbox_sharing_target: "twitter" }, target: "_blank" }
|
|
|
|
%i.fab.fa-twitter.fa-fw
|
|
|
|
Twitter
|
|
|
|
%a.btn.btn-primary{ href: "#", data: { inbox_sharing_target: "tumblr" }, target: "_blank" }
|
|
|
|
%i.fab.fa-tumblr.fa-fw
|
|
|
|
Tumblr
|
2023-02-19 11:58:47 -08:00
|
|
|
%a.btn.btn-primary{ href: "#", data: { inbox_sharing_target: "telegram" }, target: "_blank" }
|
|
|
|
%i.fab.fa-telegram.fa-fw
|
|
|
|
Telegram
|
2023-11-22 09:19:35 -08:00
|
|
|
%a.btn.btn-primary{ data: { controller: :clipboard, action: "clipboard#copy", inbox_sharing_target: "clipboard" } }
|
2023-11-22 08:54:04 -08:00
|
|
|
%i.fa.fa-fw.fa-solid.fa-copy
|
|
|
|
= t("actions.share.copy")
|
2023-10-16 06:02:57 -07:00
|
|
|
%button.btn.btn-primary{ data: { controller: "share", action: "share#share", inbox_sharing_target: "other" } }
|
|
|
|
%i.fa.fa-fw.fa-share-alt
|
|
|
|
= t("actions.share.other")
|
2023-02-05 12:30:16 -08:00
|
|
|
- if current_user.sharing_custom_url.present?
|
2023-02-05 10:49:06 -08:00
|
|
|
%a.btn.btn-primary{ href: current_user.sharing_custom_url, data: { inbox_sharing_target: "custom" }, target: "_blank" }
|
|
|
|
= current_user.display_sharing_custom_url
|
|
|
|
%p.text-muted= t(".sharing.hint_html", settings: link_to(t(".sharing.settings"), settings_sharing_path))
|