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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
1.4 KiB
Plaintext
Raw Normal View History

- provide(:title, question_title(@question))
.card.question--sticky
.container
.card-body
= render QuestionComponent.new(question: @question)
.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|
= render "answerbox", a:, show_question: false
2015-01-03 10:02:06 -08:00
- if @more_data_available
.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 },
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
- 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
%textarea.form-control#q-answer-text{ placeholder: t("inbox.entry.placeholder"), data: { id: @question.id } }
%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")