Fix lints in app/views/application
This commit is contained in:
parent
c585fe3760
commit
ed6528c948
|
@ -1,3 +1,3 @@
|
||||||
- provide(:title, answer_title(@answer))
|
- provide(:title, answer_title(@answer))
|
||||||
.container.container--main
|
.container.container--main
|
||||||
= render 'answerbox', a: @answer
|
= render 'answerbox', a: @answer, display_all: @display_all
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
.card.answerbox{ data: { id: a.id, q_id: a.question.id } }
|
.card.answerbox{ data: { id: a.id, q_id: a.question.id } }
|
||||||
- if @question.nil?
|
- if @question.nil?
|
||||||
= render "answerbox/header", a: a
|
= render 'answerbox/header', a: a
|
||||||
.card-body
|
.card-body
|
||||||
- if @display_all.nil?
|
- if display_all.nil?
|
||||||
.answerbox__answer-text
|
.answerbox__answer-text
|
||||||
= markdown a.content[0..255]
|
= markdown a.content[0..255]
|
||||||
- if a.content.length > 255
|
- if a.content.length > 255
|
||||||
|
@ -22,11 +22,11 @@
|
||||||
%img.answerbox__answer-user-avatar.avatar-sm{ src: a.user.profile_picture.url(:medium) }
|
%img.answerbox__answer-user-avatar.avatar-sm{ src: a.user.profile_picture.url(:medium) }
|
||||||
.media-body
|
.media-body
|
||||||
%h6.media-heading.answerbox__answer-user
|
%h6.media-heading.answerbox__answer-user
|
||||||
= raw t('views.answerbox.answered', hide: hidespan(t('views.answerbox.hide'), "d-none d-sm-inline"), user: user_screen_name(a.user))
|
= raw t('views.answerbox.answered', hide: hidespan(t('views.answerbox.hide'), 'd-none d-sm-inline'), user: user_screen_name(a.user))
|
||||||
.answerbox__answer-date
|
.answerbox__answer-date
|
||||||
= link_to(raw(t('views.answerbox.time', time: time_tooltip(a))), show_user_answer_path(a.user.screen_name, a.id))
|
= link_to(raw(t('views.answerbox.time', time: time_tooltip(a))), show_user_answer_path(a.user.screen_name, a.id))
|
||||||
.col.col-sm-8.col-md-6.text-right
|
.col.col-sm-8.col-md-6.text-right
|
||||||
= render 'answerbox/actions', a: a
|
= render 'answerbox/actions', a: a, display_all: display_all
|
||||||
- else
|
- else
|
||||||
.row
|
.row
|
||||||
.col-4.col-sm-4.col-md-6.text-left.text-muted
|
.col-4.col-sm-4.col-md-6.text-left.text-muted
|
||||||
|
@ -34,6 +34,6 @@
|
||||||
= link_to(raw(t('views.answerbox.time', time: time_tooltip(a))), show_user_answer_path(a.user.screen_name, a.id))
|
= link_to(raw(t('views.answerbox.time', time: time_tooltip(a))), show_user_answer_path(a.user.screen_name, a.id))
|
||||||
.col-8.col-sm-8.col-md-6.text-right
|
.col-8.col-sm-8.col-md-6.text-right
|
||||||
= render 'answerbox/actions', a: a
|
= render 'answerbox/actions', a: a
|
||||||
.card-footer{id: "ab-comments-section-#{a.id}", style: @display_all.nil? ? 'display: none' : nil }
|
.card-footer{ id: "ab-comments-section-#{a.id}", style: display_all.nil? ? 'display: none' : nil }
|
||||||
%div{ id: "ab-smiles-#{a.id}" }= render 'answerbox/smiles', a: a
|
%div{ id: "ab-smiles-#{a.id}" }= render 'answerbox/smiles', a: a
|
||||||
%div{ id: "ab-comments-#{a.id}" }= render 'answerbox/comments', a: a
|
%div{ id: "ab-comments-#{a.id}" }= render 'answerbox/comments', a: a
|
|
@ -1,41 +1,44 @@
|
||||||
.card
|
.card
|
||||||
.card-header
|
.card-header
|
||||||
- if @user.motivation_header.blank?
|
- if user.motivation_header.blank?
|
||||||
= t 'views.questionbox.title'
|
= t 'views.questionbox.title'
|
||||||
- else
|
- else
|
||||||
= @user.motivation_header
|
= user.motivation_header
|
||||||
.card-body
|
.card-body
|
||||||
- if @user.banned?
|
- if user.banned?
|
||||||
.text-center
|
.text-center
|
||||||
%strong= t 'views.questionbox.banned'
|
%strong= t 'views.questionbox.banned'
|
||||||
- else
|
- else
|
||||||
- if user_signed_in? or @user.privacy_allow_anonymous_questions?
|
- if user_signed_in? || user.privacy_allow_anonymous_questions?
|
||||||
#question-box
|
#question-box
|
||||||
%textarea.form-control{:name => "qb-question", :placeholder => t('views.placeholder.question')}
|
%textarea.form-control{ name: 'qb-question', placeholder: t('views.placeholder.question') }
|
||||||
.row{:style => "padding-top: 5px; padding-left: 5px; padding-right: 5px;"}
|
.row{ style: 'padding-top: 5px; padding-left: 5px; padding-right: 5px;' }
|
||||||
.col-6
|
.col-6
|
||||||
- if user_signed_in?
|
- if user_signed_in?
|
||||||
- if @user.privacy_allow_anonymous_questions?
|
- if user.privacy_allow_anonymous_questions?
|
||||||
%input{:name => "qb-anonymous", :type => "checkbox"}/
|
%input{ name: 'qb-anonymous', type: :checkbox }/
|
||||||
= t 'views.actions.anonymous'
|
= t 'views.actions.anonymous'
|
||||||
%br/
|
%br/
|
||||||
- else
|
- else
|
||||||
%input{:name => "qb-anonymous", :type => "hidden", :value => "false"}/
|
%input{ name: 'qb-anonymous', type: :hidden, value: false }/
|
||||||
.col-6
|
.col-6
|
||||||
%p.pull-right
|
%p.pull-right
|
||||||
%input{name: 'qb-to', type: 'hidden', :value => @user.id}/
|
%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
|
%button.btn.btn-primary{ name: 'qb-ask',
|
||||||
|
type: :button,
|
||||||
|
data: { loading_text: t('views.questionbox.load'), promote: user_signed_in? ? 'false' : 'true' } }
|
||||||
|
Ask
|
||||||
- unless user_signed_in?
|
- unless user_signed_in?
|
||||||
- if @user.privacy_allow_anonymous_questions?
|
- if user.privacy_allow_anonymous_questions?
|
||||||
#question-box-promote{:style => "display: none;"}
|
#question-box-promote{ style: 'display: none;' }
|
||||||
.row
|
.row
|
||||||
.col-12.text-center
|
.col-12.text-center
|
||||||
%strong= t 'views.questionbox.promote.message'
|
%strong= t 'views.questionbox.promote.message'
|
||||||
.row
|
.row
|
||||||
.col-sm-5.offset-sm-1
|
.col-sm-5.offset-sm-1
|
||||||
%button#create-account.btn.btn-block.btn-primary= t 'views.questionbox.promote.create'
|
%button.btn.btn-block.btn-primary#create-account= t 'views.questionbox.promote.create'
|
||||||
.col-sm-5
|
.col-sm-5
|
||||||
%button#new-question.btn.btn-block.btn-default= t 'views.questionbox.promote.another'
|
%button.btn.btn-block.btn-default#new-question= t 'views.questionbox.promote.another'
|
||||||
.row
|
.row
|
||||||
.col-xs-12.col-sm-10.offset-sm-1.text-center
|
.col-xs-12.col-sm-10.offset-sm-1.text-center
|
||||||
%small= t('views.questionbox.promote.join', app_title: APP_CONFIG['site_name'])
|
%small= t('views.questionbox.promote.join', app_title: APP_CONFIG['site_name'])
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
= render 'user/profile', user: @user
|
= render 'user/profile', user: @user
|
||||||
.d-none.d-sm-block= render 'shared/links'
|
.d-none.d-sm-block= render 'shared/links'
|
||||||
.col-md-9.col-xs-12.col-sm-8
|
.col-md-9.col-xs-12.col-sm-8
|
||||||
= render 'questionbox'
|
= render 'questionbox', user: @user
|
||||||
= render 'tabs/profile', user: @user
|
= render 'tabs/profile', user: @user
|
||||||
= yield
|
= yield
|
||||||
- if user_signed_in?
|
- if user_signed_in?
|
||||||
|
|
Loading…
Reference in New Issue