28 lines
1.3 KiB
Plaintext
28 lines
1.3 KiB
Plaintext
- provide(:title, question_title(@question))
|
|
= render 'question', question: @question, hidden: false
|
|
= render 'question', question: @question, hidden: true
|
|
.container.question-page
|
|
#answers
|
|
- @answers.each do |a|
|
|
= render 'answerbox', a: a, show_question: false
|
|
|
|
= render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @answers_last_id
|
|
|
|
- if @more_data_available
|
|
.d-flex.justify-content-center.justify-content-sm-start
|
|
%button.btn.btn-light#load-more-btn{ type: :button, data: { last_id: @answers_last_id } }
|
|
= t("voc.load")
|
|
|
|
- if user_signed_in? && !current_user.answered?(@question) && current_user != @question.user && @question.user&.privacy_allow_stranger_answers
|
|
.card#q-answer-box
|
|
.card-header= t('.questionbox.title')
|
|
.card-body
|
|
%textarea.form-control#q-answer-text{ placeholder: t("inbox.entry.placeholder"), data: { id: @question.id } }
|
|
%br/
|
|
%button.btn.btn-success#q-answer-btn{ data: { q_id: @question.id } }
|
|
= t("voc.answer")
|
|
- current_user.services.each do |service|
|
|
%label
|
|
%input{ type: 'checkbox', name: 'share', checked: :checked, data: { q_id: @question.id, service: service.provider } }
|
|
= t("inbox.entry.sharing.post_to", service: service.provider.capitalize)
|