2014-11-02 08:55:16 -08:00
|
|
|
.panel.panel-default
|
|
|
|
.panel-heading
|
|
|
|
%h3.panel-title
|
2014-11-29 13:34:11 -08:00
|
|
|
- if @user.motivation_header.blank?
|
2015-05-26 19:31:28 -07:00
|
|
|
= t 'views.questionbox.title'
|
2014-11-29 13:34:11 -08:00
|
|
|
- else
|
|
|
|
= @user.motivation_header
|
2014-11-02 08:55:16 -08:00
|
|
|
.panel-body
|
2015-01-12 13:44:13 -08:00
|
|
|
- if @user.banned?
|
|
|
|
.row
|
|
|
|
.col-xs-12.text-center
|
2015-05-26 19:31:28 -07:00
|
|
|
%strong= t 'views.questionbox.banned'
|
2015-01-12 13:44:13 -08:00
|
|
|
- else
|
|
|
|
- if user_signed_in? or @user.privacy_allow_anonymous_questions?
|
|
|
|
#question-box
|
2015-01-03 13:27:14 -08:00
|
|
|
.row
|
2015-01-12 13:44:13 -08:00
|
|
|
.col-xs-12
|
|
|
|
%textarea.form-control{:name => "qb-question", :placeholder => "Type your question here…"}
|
|
|
|
.row{:style => "padding-top: 5px; padding-left: 5px; padding-right: 5px;"}
|
|
|
|
.col-xs-6
|
|
|
|
- if user_signed_in?
|
|
|
|
- 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
|
|
|
|
%input{:name => "qb-anonymous", :type => "hidden", :value => "false"}/
|
|
|
|
.col-xs-6
|
|
|
|
%p.pull-right
|
|
|
|
%input{name: 'qb-to', type: 'hidden', :value => @user.id}/
|
|
|
|
%button.btn.btn-primary{name: 'qb-ask', :type => "button", data: {loading_text: 'Asking...', promote: user_signed_in? ? "false" : "true" }} Ask
|
|
|
|
- unless user_signed_in?
|
|
|
|
- if @user.privacy_allow_anonymous_questions?
|
|
|
|
#question-box-promote.row{:style => "display: none;"}
|
|
|
|
.row
|
|
|
|
.col-xs-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
|
|
|
|
.col-sm-1
|
|
|
|
.col-sm-5
|
2015-05-26 19:31:28 -07:00
|
|
|
%button#create-account.btn.btn-block.btn-primary= t 'views.questionbox.promote.create'
|
2015-01-12 13:44:13 -08:00
|
|
|
.col-sm-5
|
2015-05-26 19:31:28 -07:00
|
|
|
%button#new-question.btn.btn-block.btn-default= t 'views.questionbox.promote.another'
|
2015-01-12 13:44:13 -08:00
|
|
|
.col-sm-1
|
|
|
|
.row
|
|
|
|
.col-sm-1
|
2015-05-26 19:31:28 -07:00
|
|
|
.col-xs-12.col-sm-10.text-center
|
|
|
|
%small= t('views.questionbox.promote.join', app_title: APP_CONFIG['site_name'])
|
2015-01-12 13:44:13 -08:00
|
|
|
.col-sm-1
|
|
|
|
- else
|
2015-05-26 19:31:28 -07:00
|
|
|
%p= raw t 'views.questionbox.required', signup: link_to(t('views.sessions.new'),new_user_registration_path)
|