Fix lints in app/views/inbox
This commit is contained in:
parent
7243fa11d4
commit
3a335798fe
|
@ -22,7 +22,7 @@
|
|||
btn.button "reset"
|
||||
|
||||
($ document).on "click", "button#ib-author", ->
|
||||
$('#author_form').submit ->
|
||||
$('#author-form').submit ->
|
||||
query = $('#author').val()
|
||||
window.location.href = '/inbox/' + query
|
||||
false
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
%h6.text-muted.media-heading.answerbox__question-user
|
||||
= raw t('views.inbox.entry.asked', user: user_screen_name(i.question.user, anonymous: i.question.author_is_anonymous), time: time_tooltip(i.question))
|
||||
- unless i.question.author_is_anonymous
|
||||
- if i.question.answer_count > 0
|
||||
- if i.question.answer_count.positive?
|
||||
·
|
||||
%a{ href: show_user_question_path(i.question.user.screen_name, i.question.id) }
|
||||
= pluralize(i.question.answer_count, t('views.inbox.entry.response'))
|
||||
|
@ -25,7 +25,7 @@
|
|||
%span.sr-only= t 'views.actions.options'
|
||||
.card-footer{ id: "ib-options-#{i.id}", style: 'display: none' }
|
||||
%h4= t 'views.inbox.entry.sharing.title'
|
||||
- if current_user.services.count > 0
|
||||
- if current_user.services.count.positive?
|
||||
.row
|
||||
- current_user.services.each do |service|
|
||||
.col-md-3.col-sm-4.col-xs-6
|
|
@ -0,0 +1,27 @@
|
|||
.card
|
||||
.card-header= t 'views.inbox.sidebar.questions.title'
|
||||
.card-body
|
||||
%button.btn.btn-block.btn-info{ type: :button, id: 'ib-generate-question' }= t 'views.inbox.sidebar.questions.button'
|
||||
.card
|
||||
.card-header= t 'views.inbox.sidebar.share.title'
|
||||
.card-body
|
||||
%a.btn.btn-block.btn-primary{ target: '_blank',
|
||||
href: "https://twitter.com/intent/tweet?text=Ask%20me%20anything%21&url=#{show_user_profile_url(current_user.screen_name)}" }
|
||||
%i.fa.fa-fw.fa-twitter
|
||||
= raw t('views.inbox.sidebar.share.button', service: 'Twitter')
|
||||
%a.btn.btn-block.btn-primary{ target: '_blank',
|
||||
href: "https://www.tumblr.com/share/link?url=#{show_user_profile_url(current_user.screen_name)}&name=Ask%20me%20anything%21" }
|
||||
%i.fa.fa-fw.fa-tumblr
|
||||
= raw t('views.inbox.sidebar.share.button', service: 'Tumblr')
|
||||
.card
|
||||
.card-header Show author
|
||||
.card-body
|
||||
%form#author-form
|
||||
= bootstrap_form_tag url: inbox_path, method: :get do |f|
|
||||
= f.text_field :author, value: params[:author], placeholder: 'username', prepend: '@', hide_label: true
|
||||
= f.button 'Show', name: nil, class: 'btn btn-light btn-block btn-sm', id: 'ib-author'
|
||||
.card
|
||||
.card-header= t 'views.inbox.sidebar.actions.title'
|
||||
.card-body
|
||||
%button.btn.btn-block.btn-danger{ type: :button, id: delete_id, disabled: (disabled ? 'disabled' : nil), data: { ib_count: inbox_count } }
|
||||
= t 'views.inbox.sidebar.actions.button'
|
|
@ -1,25 +0,0 @@
|
|||
.card.inbox--panel
|
||||
.card-header= t 'views.inbox.sidebar.questions.title'
|
||||
.card-body
|
||||
%button.btn.btn-block.btn-info{type: :button, id: 'ib-generate-question'}= t 'views.inbox.sidebar.questions.button'
|
||||
.card.inbox--panel
|
||||
.card-header= t 'views.inbox.sidebar.share.title'
|
||||
.card-body
|
||||
%a.btn.btn-block.btn-primary{target: '_blank', href: "https://twitter.com/intent/tweet?text=Ask%20me%20anything%21&url=#{show_user_profile_url(current_user.screen_name)}"}
|
||||
%i.fa.fa-fw.fa-twitter
|
||||
= raw t('views.inbox.sidebar.share.button', service: "Twitter")
|
||||
%a.btn.btn-block.btn-primary{target: '_blank', href: "https://www.tumblr.com/share/link?url=#{show_user_profile_url(current_user.screen_name)}&name=Ask%20me%20anything%21"}
|
||||
%i.fa.fa-fw.fa-tumblr
|
||||
= raw t('views.inbox.sidebar.share.button', service: "Tumblr")
|
||||
.card.inbox--panel
|
||||
.card-header Show author
|
||||
.card-body
|
||||
%form#author_form
|
||||
= bootstrap_form_tag url: inbox_path, method: :get do |f|
|
||||
= f.text_field :author, value: params[:author], placeholder: "username", prepend: "@" , hide_label: true
|
||||
= f.button "Show", name: nil, class: "btn btn-light btn-block btn-sm", id: "ib-author"
|
||||
.card.warning--panel
|
||||
.card-header= t 'views.inbox.sidebar.actions.title'
|
||||
.card-body
|
||||
%button.btn.btn-block.btn-danger{type: :button, id: @delete_id , disabled: (@disabled ? 'disabled' : nil), data: { ib_count: @inbox_count }}= t 'views.inbox.sidebar.actions.button'
|
||||
|
|
@ -8,5 +8,5 @@
|
|||
= render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @inbox_last_id
|
||||
|
||||
- if @more_data_available
|
||||
%button#load-more-btn.btn.btn-default{type: :button, data: { last_id: @inbox_last_id }}
|
||||
%button.btn.btn-default#load-more-btn{ type: :button, data: { last_id: @inbox_last_id } }
|
||||
= t 'views.actions.load'
|
|
@ -1,7 +1,7 @@
|
|||
.container.container--main
|
||||
.row
|
||||
.col-md-3.col-xs-12.col-sm-4.order-2.order-sm-1
|
||||
= render 'inbox/sidebar'
|
||||
= render 'inbox/sidebar', delete_id: @delete_id, disabled: @disabled, inbox_count: @inbox_count
|
||||
.col-md-9.col-xs-12.col-sm-8.order-1.order-sm-2
|
||||
= render 'layouts/messages'
|
||||
= yield
|
||||
|
|
Loading…
Reference in New Issue