2015-05-13 15:02:19 -07:00
|
|
|
- provide(:title, question_title(@question))
|
2023-10-20 15:27:36 -07:00
|
|
|
.card.question--sticky
|
|
|
|
.container
|
|
|
|
.card-body
|
|
|
|
= render QuestionComponent.new(question: @question)
|
2015-04-25 17:18:57 -07:00
|
|
|
.container.question-page
|
2023-03-05 09:53:53 -08:00
|
|
|
#answers{ data: { controller: "navigation" } }
|
|
|
|
%button.d-none{ data: { hotkey: "j", action: "navigation#down" } }
|
|
|
|
%button.d-none{ data: { hotkey: "k", action: "navigation#up" } }
|
2023-12-10 12:57:05 -08:00
|
|
|
- if @answers.empty?
|
|
|
|
= render "shared/empty", icon: "fa-regular fa-comments", translation_key: ".question"
|
|
|
|
|
2015-01-03 10:14:26 -08:00
|
|
|
- @answers.each do |a|
|
2023-11-26 10:32:50 -08:00
|
|
|
= render "answerbox", a:, show_question: false
|
2015-01-03 10:02:06 -08:00
|
|
|
|
2020-04-20 14:03:57 -07:00
|
|
|
- if @more_data_available
|
2022-09-08 14:09:59 -07:00
|
|
|
.d-flex.justify-content-center.justify-content-sm-start#paginator
|
2023-01-21 10:55:57 -08: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 },
|
2023-03-19 06:42:01 -07:00
|
|
|
data: { controller: :hotkey, hotkey: "." },
|
2023-01-21 10:55:57 -08:00
|
|
|
form: { data: { turbo_stream: true } }
|
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")
|