Retrospring/app/views/question/show.haml

27 lines
1.3 KiB
Plaintext
Raw Normal View History

- provide(:title, question_title(@question))
= render 'question', question: @question, hidden: false
= render 'question', question: @question, hidden: true
.container.question-page
2015-01-03 10:14:26 -08:00
#answers
- @answers.each do |a|
2020-04-26 08:13:31 -07:00
= render 'answerbox', a: a, show_question: false
2015-01-03 10:02:06 -08: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
- if @more_data_available
2020-05-10 02:00:35 -07:00
%button.btn.btn-default#load-more-btn{ type: :button, data: { last_id: @answers_last_id } }
2015-01-03 10:24:51 -08:00
Load more
- 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
.card-header= t('views.question.title')
2020-04-19 14:09:41 -07:00
.card-body
2020-05-10 02:00:35 -07:00
%textarea.form-control#q-answer-text{ placeholder: t('views.placeholder.inbox'), 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 } }
2015-06-08 11:48:23 -07:00
= t('views.actions.answer')
- current_user.services.each do |service|
%label
2020-05-10 02:00:35 -07:00
%input{ type: 'checkbox', name: 'share', checked: :checked, data: { q_id: @question.id, service: service.provider } }
2015-06-08 11:48:23 -07:00
= t('views.inbox.entry.sharing.post', service: service.provider.capitalize)