2020-04-26 16:25:54 +02:00
|
|
|
.card.inbox-box{class: "bg-#{i.new? ? 'primary' : 'default'}", data: { id: i.id }}
|
2020-04-19 23:09:41 +02:00
|
|
|
.card-header
|
2014-12-09 23:21:41 +01:00
|
|
|
.media
|
|
|
|
- unless i.question.author_is_anonymous
|
|
|
|
%a.pull-left{href: show_user_profile_path(i.question.user.screen_name)}
|
2020-04-21 00:18:14 +02:00
|
|
|
%img.img-rounded.answerbox--img{src: i.question.user.profile_picture.url(:medium)}
|
2014-12-09 23:21:41 +01:00
|
|
|
.media-body
|
|
|
|
%h6.text-muted.media-heading.answerbox--question-user
|
2017-03-30 19:17:25 +02:00
|
|
|
= raw t('views.inbox.entry.asked', user: user_screen_name(i.question.user, anonymous: i.question.author_is_anonymous), time: time_tooltip(i.question))
|
2014-12-09 23:21:41 +01:00
|
|
|
- unless i.question.author_is_anonymous
|
|
|
|
- if i.question.answer_count > 0
|
|
|
|
·
|
|
|
|
%a{href: show_user_question_path(i.question.user.screen_name, i.question.id)}
|
2015-06-07 00:24:27 +02:00
|
|
|
= pluralize(i.question.answer_count, t('views.inbox.entry.response'))
|
2014-12-09 23:21:41 +01:00
|
|
|
%p.answerbox--question-text= i.question.content
|
2020-04-19 23:09:41 +02:00
|
|
|
.card-body
|
2015-06-08 20:48:23 +02:00
|
|
|
%textarea.form-control{name: 'ib-answer', placeholder: t('views.placeholder.inbox'), data: { id: i.id }}
|
2014-12-09 23:21:41 +01:00
|
|
|
%br/
|
|
|
|
%button.btn.btn-success{name: 'ib-answer', data: { ib_id: i.id }}
|
2015-06-07 00:24:27 +02:00
|
|
|
= t 'views.actions.answer'
|
2014-12-09 23:21:41 +01:00
|
|
|
%button.btn.btn-danger{name: 'ib-destroy', data: { ib_id: i.id }}
|
2015-06-07 00:24:27 +02:00
|
|
|
= t 'views.actions.delete'
|
2015-01-27 18:25:20 +01:00
|
|
|
%button.btn.btn-default{name: 'ib-options', data: { ib_id: i.id, state: :hidden }}
|
2015-01-28 06:49:17 +01:00
|
|
|
%i.fa.fa-cog
|
2015-06-07 00:24:27 +02:00
|
|
|
%span.sr-only= t 'views.actions.options'
|
2020-04-19 23:09:41 +02:00
|
|
|
.card-footer{id: "ib-options-#{i.id}", style: 'display: none'}
|
2015-06-07 00:24:27 +02:00
|
|
|
%h4= t 'views.inbox.entry.sharing.title'
|
2015-01-28 06:49:17 +01:00
|
|
|
- if current_user.services.count > 0
|
2015-01-27 18:13:24 +01:00
|
|
|
.row
|
2015-01-30 20:32:10 +01:00
|
|
|
- current_user.services.each do |service|
|
2015-01-30 20:34:28 +01:00
|
|
|
.col-md-3.col-sm-4.col-xs-6
|
2015-01-30 20:32:10 +01:00
|
|
|
%label
|
|
|
|
%input{type: 'checkbox', name: 'ib-share', checked: :checked, data: { ib_id: i.id, service: service.provider }}
|
2015-06-07 00:24:27 +02:00
|
|
|
= raw t('views.inbox.entry.sharing.post', service: service.provider.capitalize)
|
2015-01-27 18:13:24 +01:00
|
|
|
- else
|
2015-06-07 02:57:21 +02:00
|
|
|
%p= raw t('views.inbox.entry.sharing.none', settings: link_to(t('views.inbox.entry.sharing.settings'), services_path))
|