2015-05-13 15:02:19 -07:00
|
|
|
- provide(:title, question_title(@question))
|
2015-05-12 11:48:06 -07:00
|
|
|
= render 'shared/question_header', question: @question, hidden: false
|
|
|
|
= render 'shared/question_header', question: @question, hidden: true
|
2015-04-25 17:18:57 -07:00
|
|
|
.container.question-page
|
2014-12-07 11:51:44 -08:00
|
|
|
/ TODO: make this pretty (it's currently C-c'd straight from shared/_answerbox)
|
2015-01-03 09:41:10 -08:00
|
|
|
|
2015-01-03 10:14:26 -08:00
|
|
|
#answers
|
|
|
|
- @answers.each do |a|
|
|
|
|
= render 'shared/answerbox', a: a, show_question: false
|
2015-01-03 10:02:06 -08:00
|
|
|
|
2015-01-03 10:24:51 -08:00
|
|
|
#pagination= will_paginate @answers, renderer: BootstrapPagination::Rails, page_links: false
|
|
|
|
|
|
|
|
- if @answers.next_page
|
|
|
|
%button#load-more-btn.btn.btn-default{type: :button, data: { current_page: @answers.current_page }}
|
|
|
|
Load more
|
|
|
|
|
2015-01-03 13:37:10 -08:00
|
|
|
- if user_signed_in? and !current_user.answered? @question and current_user != @question.user and @question.user.privacy_allow_stranger_answers
|
2020-04-19 14:31:24 -07:00
|
|
|
.card#q-answer-box
|
2020-04-19 14:09:41 -07:00
|
|
|
.card-header
|
|
|
|
%h3.card-title= t('views.question.title')
|
|
|
|
.card-body
|
2015-06-08 11:48:23 -07:00
|
|
|
%textarea#q-answer.form-control{placeholder: t('views.placeholder.inbox'), data: { id: @question.id }}
|
2015-01-03 09:41:10 -08:00
|
|
|
%br/
|
|
|
|
%button#q-answer.btn.btn-success{data: { q_id: @question.id }}
|
2015-06-08 11:48:23 -07:00
|
|
|
= t('views.actions.answer')
|
2015-01-03 09:41:10 -08:00
|
|
|
- current_user.services.each do |service|
|
|
|
|
%label
|
|
|
|
%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)
|