37 lines
2.0 KiB
Plaintext
37 lines
2.0 KiB
Plaintext
.card.inbox-entry{ class: i.new? ? 'inbox-entry--new' : '', data: { id: i.id } }
|
|
.card-header
|
|
.media
|
|
- unless i.question.author_is_anonymous
|
|
%a.pull-left{ href: show_user_profile_path(i.question.user.screen_name) }
|
|
%img.answerbox__question-user-avatar.avatar-md{ src: i.question.user.profile_picture.url(:medium) }
|
|
.media-body
|
|
%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.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'))
|
|
%p.answerbox__question-text= i.question.content
|
|
.card-body
|
|
%textarea.form-control{ name: 'ib-answer', placeholder: t('views.placeholder.inbox'), data: { id: i.id } }
|
|
%br/
|
|
%button.btn.btn-success{ name: 'ib-answer', data: { ib_id: i.id } }
|
|
= t 'views.actions.answer'
|
|
%button.btn.btn-danger{ name: 'ib-destroy', data: { ib_id: i.id } }
|
|
= t 'views.actions.delete'
|
|
%button.btn.btn-default{ name: 'ib-options', data: { ib_id: i.id, state: :hidden } }
|
|
%i.fa.fa-cog
|
|
%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.positive?
|
|
.row
|
|
- current_user.services.each do |service|
|
|
.col-md-3.col-sm-4.col-xs-6
|
|
%label
|
|
%input{ type: 'checkbox', name: 'ib-share', checked: :checked, data: { ib_id: i.id, service: service.provider } }
|
|
= raw t('views.inbox.entry.sharing.post', service: service.provider.capitalize)
|
|
- else
|
|
%p= raw t('views.inbox.entry.sharing.none', settings: link_to(t('views.inbox.entry.sharing.settings'), services_path))
|