2015-05-13 15:02:19 -07:00
|
|
|
- provide(:title, question_title(@question))
|
2022-07-31 07:06:09 -07:00
|
|
|
= render "question", question: @question, hidden: false
|
|
|
|
= render "question", question: @question, hidden: true
|
2015-04-25 17:18:57 -07:00
|
|
|
.container.question-page
|
2015-01-03 10:14:26 -08:00
|
|
|
#answers
|
|
|
|
- @answers.each do |a|
|
2022-07-31 07:06:09 -07:00
|
|
|
= render "answerbox", a: a, show_question: false
|
2015-01-03 10:02:06 -08:00
|
|
|
|
2022-07-31 07:06:09 -07:00
|
|
|
= render "shared/cursored_pagination_dummy", more_data_available: @more_data_available, last_id: @answers_last_id
|
2015-01-03 10:24:51 -08:00
|
|
|
|
2020-04-20 14:03:57 -07:00
|
|
|
- if @more_data_available
|
2020-05-29 14:00:25 -07:00
|
|
|
.d-flex.justify-content-center.justify-content-sm-start
|
2020-05-29 11:37:47 -07:00
|
|
|
%button.btn.btn-light#load-more-btn{ type: :button, data: { last_id: @answers_last_id } }
|
2022-07-30 09:50:46 -07:00
|
|
|
= t("voc.load")
|
2015-01-03 10:24:51 -08:00
|
|
|
|
2020-05-08 17:43:43 -07:00
|
|
|
- if user_signed_in? && !current_user.answered?(@question) && current_user != @question.user && @question.user&.privacy_allow_stranger_answers
|
2020-04-19 14:31:24 -07:00
|
|
|
.card#q-answer-box
|
2022-07-31 07:06:09 -07:00
|
|
|
.card-header= t(".questionbox.title")
|
2020-04-19 14:09:41 -07:00
|
|
|
.card-body
|
2022-04-25 23:13:10 -07:00
|
|
|
%textarea.form-control#q-answer-text{ placeholder: t("inbox.entry.placeholder"), data: { id: @question.id } }
|
2015-01-03 09:41:10 -08:00
|
|
|
%br/
|
2020-05-10 02:00:35 -07:00
|
|
|
%button.btn.btn-success#q-answer-btn{ data: { q_id: @question.id } }
|
2022-07-30 09:50:46 -07:00
|
|
|
= t("voc.answer")
|
2015-01-03 09:41:10 -08:00
|
|
|
- current_user.services.each do |service|
|
|
|
|
%label
|
2022-07-31 07:06:09 -07:00
|
|
|
%input{ type: "checkbox", name: "share", checked: :checked, data: { q_id: @question.id, service: service.provider } }
|
2022-07-28 14:50:10 -07:00
|
|
|
= t("inbox.entry.sharing.post_to", service: service.provider.capitalize)
|