retrospring/app/views/question/show.html.haml

25 lines
1.1 KiB
Text
Raw Normal View History

- provide(:title, question_title(@question))
2022-07-31 16:06:09 +02:00
= render "question", question: @question, hidden: false
= render "question", question: @question, hidden: true
.container.question-page
2015-01-03 19:14:26 +01:00
#answers
- @answers.each do |a|
2022-07-31 16:06:09 +02:00
= render "answerbox", a: a, show_question: false
2015-01-03 19:02:06 +01:00
- if @more_data_available
.d-flex.justify-content-center.justify-content-sm-start#paginator
2023-01-21 19:55:57 +01:00
= button_to t("voc.load"), question_path(@question.user.screen_name, @question.id),
class: "btn btn-light",
method: :get,
params: { last_id: @answers_last_id },
form: { data: { turbo_stream: true } }
2015-01-03 19:24:51 +01:00
- if user_signed_in? && !current_user.answered?(@question) && current_user != @question.user && @question.user&.privacy_allow_stranger_answers
2020-04-19 23:31:24 +02:00
.card#q-answer-box
2022-07-31 16:06:09 +02:00
.card-header= t(".questionbox.title")
2020-04-19 23:09:41 +02:00
.card-body
%textarea.form-control#q-answer-text{ placeholder: t("inbox.entry.placeholder"), data: { id: @question.id } }
%br/
2020-05-10 11:00:35 +02:00
%button.btn.btn-success#q-answer-btn{ data: { q_id: @question.id } }
2022-07-30 18:50:46 +02:00
= t("voc.answer")