Skip inbox entry actions menu if it's be empty
This commit is contained in:
parent
649bacfc45
commit
c90daf1756
|
@ -12,19 +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
|
- if i.question.user_id != current_user.id || current_user.has_role?(:administrator)
|
||||||
.btn-group
|
.pull-right
|
||||||
%button.btn.btn-default.btn-sm.dropdown-toggle{ data: { toggle: :dropdown }, aria: { expanded: false } }
|
.btn-group
|
||||||
%span.caret
|
%button.btn.btn-default.btn-sm.dropdown-toggle{ data: { toggle: :dropdown }, aria: { expanded: false } }
|
||||||
.dropdown-menu.dropdown-menu-right{ role: :menu }
|
%span.caret
|
||||||
- if i.question.user_id != current_user.id
|
.dropdown-menu.dropdown-menu-right{ role: :menu }
|
||||||
%a.dropdown-item{ name: 'ib-report', data: { q_id: i.question.id } }
|
- if i.question.user_id != current_user.id
|
||||||
%i.fa.fa-warning
|
%a.dropdown-item{ name: 'ib-report', data: { q_id: i.question.id } }
|
||||||
= t 'views.actions.report'
|
%i.fa.fa-warning
|
||||||
- if current_user.has_role? :administrator
|
= t 'views.actions.report'
|
||||||
%a.dropdown-item{ href: rails_admin_path_for_resource(i) }
|
- if current_user.has_role? :administrator
|
||||||
%i.fa.fa-gears
|
%a.dropdown-item{ href: rails_admin_path_for_resource(i) }
|
||||||
View in Kontrollzentrum
|
%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 } }
|
||||||
|
|
Loading…
Reference in New Issue