2020-05-10 04:21:41 -07:00
|
|
|
.card.inbox-entry{ class: i.new? ? 'inbox-entry--new' : '', data: { id: i.id } }
|
2020-04-19 14:09:41 -07:00
|
|
|
.card-header
|
2014-12-09 14:21:41 -08:00
|
|
|
.media
|
|
|
|
- unless i.question.author_is_anonymous
|
2020-05-10 04:21:41 -07:00
|
|
|
%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) }
|
2014-12-09 14:21:41 -08:00
|
|
|
.media-body
|
2020-05-07 06:01:35 -07:00
|
|
|
%h6.text-muted.media-heading.answerbox__question-user
|
2017-03-30 10:17:25 -07: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))
|
2020-11-16 09:18:42 -08:00
|
|
|
- if !i.question.author_is_anonymous && 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'))
|
2020-05-02 11:35:48 -07:00
|
|
|
%p.answerbox__question-text= i.question.content
|
2021-08-11 13:38:53 -07:00
|
|
|
- if i.question.user_id != current_user.id || current_user.has_role?(:administrator)
|
|
|
|
.pull-right
|
|
|
|
.btn-group
|
|
|
|
%button.btn.btn-default.btn-sm.dropdown-toggle{ data: { toggle: :dropdown }, aria: { expanded: false } }
|
|
|
|
%span.caret
|
|
|
|
.dropdown-menu.dropdown-menu-right{ role: :menu }
|
|
|
|
- if i.question.user_id != current_user.id
|
|
|
|
%a.dropdown-item{ name: 'ib-report', data: { q_id: i.question.id } }
|
|
|
|
%i.fa.fa-warning
|
|
|
|
= t 'views.actions.report'
|
|
|
|
- if current_user.has_role? :administrator
|
|
|
|
%a.dropdown-item{ href: rails_admin_path_for_resource(i) }
|
|
|
|
%i.fa.fa-gears
|
|
|
|
View in Kontrollzentrum
|
2021-08-11 13:35:07 -07:00
|
|
|
|
2020-04-19 14:09:41 -07:00
|
|
|
.card-body
|
2020-05-10 04:21:41 -07:00
|
|
|
%textarea.form-control{ name: 'ib-answer', placeholder: t('views.placeholder.inbox'), data: { id: i.id } }
|
2014-12-09 14:21:41 -08:00
|
|
|
%br/
|
2020-05-10 04:21:41 -07:00
|
|
|
%button.btn.btn-success{ name: 'ib-answer', data: { ib_id: i.id } }
|
2015-06-06 15:24:27 -07:00
|
|
|
= t 'views.actions.answer'
|
2020-05-10 04:21:41 -07:00
|
|
|
%button.btn.btn-danger{ name: 'ib-destroy', data: { ib_id: i.id } }
|
2015-06-06 15:24:27 -07:00
|
|
|
= t 'views.actions.delete'
|
2020-05-10 04:21:41 -07:00
|
|
|
%button.btn.btn-default{ name: 'ib-options', data: { ib_id: i.id, state: :hidden } }
|
2015-01-27 21:49:17 -08:00
|
|
|
%i.fa.fa-cog
|
2015-06-06 15:24:27 -07:00
|
|
|
%span.sr-only= t 'views.actions.options'
|
2020-05-10 04:21:41 -07:00
|
|
|
.card-footer{ id: "ib-options-#{i.id}", style: 'display: none' }
|
2015-06-06 15:24:27 -07:00
|
|
|
%h4= t 'views.inbox.entry.sharing.title'
|
2020-05-10 04:21:41 -07:00
|
|
|
- if current_user.services.count.positive?
|
2015-01-27 09:13:24 -08:00
|
|
|
.row
|
2015-01-30 11:32:10 -08:00
|
|
|
- current_user.services.each do |service|
|
2015-01-30 11:34:28 -08:00
|
|
|
.col-md-3.col-sm-4.col-xs-6
|
2015-01-30 11:32:10 -08:00
|
|
|
%label
|
2020-05-10 04:21:41 -07:00
|
|
|
%input{ type: 'checkbox', name: 'ib-share', checked: :checked, data: { ib_id: i.id, service: service.provider } }
|
2015-06-06 15:24:27 -07:00
|
|
|
= raw t('views.inbox.entry.sharing.post', service: service.provider.capitalize)
|
2015-01-27 09:13:24 -08:00
|
|
|
- else
|
2015-06-06 17:57:21 -07:00
|
|
|
%p= raw t('views.inbox.entry.sharing.none', settings: link_to(t('views.inbox.entry.sharing.settings'), services_path))
|