2015-05-14 00:02:19 +02:00
|
|
|
- provide(:title, question_title(@question))
|
2020-04-30 00:44:43 +02:00
|
|
|
= render 'question', question: @question, hidden: false
|
|
|
|
= render 'question', question: @question, hidden: true
|
2015-04-26 02:18:57 +02:00
|
|
|
.container.question-page
|
2015-01-03 19:14:26 +01:00
|
|
|
#answers
|
|
|
|
- @answers.each do |a|
|
2020-04-26 17:13:31 +02:00
|
|
|
= render 'answerbox', a: a, show_question: false
|
2015-01-03 19:02:06 +01:00
|
|
|
|
2020-04-20 23:03:57 +02:00
|
|
|
= render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @answers_last_id
|
2015-01-03 19:24:51 +01:00
|
|
|
|
2020-04-20 23:03:57 +02:00
|
|
|
- if @more_data_available
|
2020-05-29 23:00:25 +02:00
|
|
|
.d-flex.justify-content-center.justify-content-sm-start
|
2020-05-29 20:37:47 +02:00
|
|
|
%button.btn.btn-light#load-more-btn{ type: :button, data: { last_id: @answers_last_id } }
|
|
|
|
= t 'views.actions.load'
|
2015-01-03 19:24:51 +01:00
|
|
|
|
2020-05-09 02:43:43 +02: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
|
2020-05-09 04:10:40 +02:00
|
|
|
.card-header= t('views.question.title')
|
2020-04-19 23:09:41 +02:00
|
|
|
.card-body
|
2020-05-10 11:00:35 +02:00
|
|
|
%textarea.form-control#q-answer-text{ placeholder: t('views.placeholder.inbox'), data: { id: @question.id } }
|
2015-01-03 18:41:10 +01:00
|
|
|
%br/
|
2020-05-10 11:00:35 +02:00
|
|
|
%button.btn.btn-success#q-answer-btn{ data: { q_id: @question.id } }
|
2015-06-08 20:48:23 +02:00
|
|
|
= t('views.actions.answer')
|
2015-01-03 18:41:10 +01:00
|
|
|
- current_user.services.each do |service|
|
|
|
|
%label
|
2020-05-10 11:00:35 +02:00
|
|
|
%input{ type: 'checkbox', name: 'share', checked: :checked, data: { q_id: @question.id, service: service.provider } }
|
2015-06-08 20:48:23 +02:00
|
|
|
= t('views.inbox.entry.sharing.post', service: service.provider.capitalize)
|