2020-04-19 14:31:24 -07:00
|
|
|
.card
|
2020-04-19 14:09:41 -07:00
|
|
|
.card-header
|
2020-05-10 05:06:22 -07:00
|
|
|
- if user.motivation_header.blank?
|
2020-04-26 07:25:54 -07:00
|
|
|
= t 'views.questionbox.title'
|
|
|
|
- else
|
2020-05-10 05:06:22 -07:00
|
|
|
= user.motivation_header
|
2020-04-19 14:09:41 -07:00
|
|
|
.card-body
|
2020-05-10 05:06:22 -07:00
|
|
|
- if user.banned?
|
2020-04-26 08:30:06 -07:00
|
|
|
.text-center
|
|
|
|
%strong= t 'views.questionbox.banned'
|
2015-01-12 13:44:13 -08:00
|
|
|
- else
|
2020-05-10 05:06:22 -07:00
|
|
|
- if user_signed_in? || user.privacy_allow_anonymous_questions?
|
2015-01-12 13:44:13 -08:00
|
|
|
#question-box
|
2020-05-10 05:06:22 -07:00
|
|
|
%textarea.form-control{ name: 'qb-question', placeholder: t('views.placeholder.question') }
|
|
|
|
.row{ style: 'padding-top: 5px; padding-left: 5px; padding-right: 5px;' }
|
2020-04-26 08:30:06 -07:00
|
|
|
.col-6
|
2015-01-12 13:44:13 -08:00
|
|
|
- if user_signed_in?
|
2020-05-10 05:06:22 -07:00
|
|
|
- if user.privacy_allow_anonymous_questions?
|
|
|
|
%input{ name: 'qb-anonymous', type: :checkbox }/
|
2015-05-26 19:31:28 -07:00
|
|
|
= t 'views.actions.anonymous'
|
2015-01-12 13:44:13 -08:00
|
|
|
%br/
|
|
|
|
- else
|
2020-05-10 05:06:22 -07:00
|
|
|
%input{ name: 'qb-anonymous', type: :hidden, value: false }/
|
2020-04-26 08:30:06 -07:00
|
|
|
.col-6
|
2015-01-12 13:44:13 -08:00
|
|
|
%p.pull-right
|
2020-05-10 05:06:22 -07:00
|
|
|
%input{ name: 'qb-to', type: 'hidden', value: user.id }/
|
|
|
|
%button.btn.btn-primary{ name: 'qb-ask',
|
|
|
|
type: :button,
|
|
|
|
data: { loading_text: t('views.questionbox.load'), promote: user_signed_in? ? 'false' : 'true' } }
|
|
|
|
Ask
|
2015-01-12 13:44:13 -08:00
|
|
|
- unless user_signed_in?
|
2020-05-10 05:06:22 -07:00
|
|
|
- if user.privacy_allow_anonymous_questions?
|
|
|
|
#question-box-promote{ style: 'display: none;' }
|
2015-01-12 13:44:13 -08:00
|
|
|
.row
|
2020-04-26 08:30:06 -07:00
|
|
|
.col-12.text-center
|
2015-05-26 19:31:28 -07:00
|
|
|
%strong= t 'views.questionbox.promote.message'
|
2015-01-12 13:44:13 -08:00
|
|
|
.row
|
2020-04-26 08:30:06 -07:00
|
|
|
.col-sm-5.offset-sm-1
|
2020-05-10 05:06:22 -07:00
|
|
|
%button.btn.btn-block.btn-primary#create-account= t 'views.questionbox.promote.create'
|
2015-01-12 13:44:13 -08:00
|
|
|
.col-sm-5
|
2020-05-10 05:06:22 -07:00
|
|
|
%button.btn.btn-block.btn-default#new-question= t 'views.questionbox.promote.another'
|
2015-01-12 13:44:13 -08:00
|
|
|
.row
|
2020-04-26 08:30:06 -07:00
|
|
|
.col-xs-12.col-sm-10.offset-sm-1.text-center
|
2015-05-26 19:31:28 -07:00
|
|
|
%small= t('views.questionbox.promote.join', app_title: APP_CONFIG['site_name'])
|
2015-01-12 13:44:13 -08:00
|
|
|
- else
|
2020-05-10 05:06:22 -07:00
|
|
|
%p= raw t 'views.questionbox.required', signup: link_to(t('views.sessions.new'), new_user_registration_path)
|