Move report and rails admin buttons to a dropdown menu in the card header
This commit is contained in:
parent
77ec8e2f4b
commit
649bacfc45
|
@ -12,6 +12,20 @@
|
||||||
%a{ href: show_user_question_path(i.question.user.screen_name, i.question.id) }
|
%a{ href: show_user_question_path(i.question.user.screen_name, i.question.id) }
|
||||||
= pluralize(i.question.answer_count, t('views.inbox.entry.response'))
|
= pluralize(i.question.answer_count, t('views.inbox.entry.response'))
|
||||||
%p.answerbox__question-text= i.question.content
|
%p.answerbox__question-text= i.question.content
|
||||||
|
.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
|
||||||
|
|
||||||
.card-body
|
.card-body
|
||||||
%textarea.form-control{ name: 'ib-answer', placeholder: t('views.placeholder.inbox'), data: { id: i.id } }
|
%textarea.form-control{ name: 'ib-answer', placeholder: t('views.placeholder.inbox'), data: { id: i.id } }
|
||||||
%br/
|
%br/
|
||||||
|
@ -19,12 +33,6 @@
|
||||||
= t 'views.actions.answer'
|
= t 'views.actions.answer'
|
||||||
%button.btn.btn-danger{ name: 'ib-destroy', data: { ib_id: i.id } }
|
%button.btn.btn-danger{ name: 'ib-destroy', data: { ib_id: i.id } }
|
||||||
= t 'views.actions.delete'
|
= t 'views.actions.delete'
|
||||||
- if i.question.user_id != current_user.id
|
|
||||||
%button.btn.btn-primary{ name: 'ib-report', data: { q_id: i.question.id } }
|
|
||||||
= t 'views.actions.report'
|
|
||||||
- if current_user.has_role? :administrator
|
|
||||||
%a.btn.btn-primary{ href: rails_admin_path_for_resource(i) }
|
|
||||||
View in Kontrollzentrum
|
|
||||||
%button.btn.btn-default{ name: 'ib-options', data: { ib_id: i.id, state: :hidden } }
|
%button.btn.btn-default{ name: 'ib-options', data: { ib_id: i.id, state: :hidden } }
|
||||||
%i.fa.fa-cog
|
%i.fa.fa-cog
|
||||||
%span.sr-only= t 'views.actions.options'
|
%span.sr-only= t 'views.actions.options'
|
||||||
|
|
Loading…
Reference in New Issue