Add links for jumping to rails admin on answers, questions and profiles

This commit is contained in:
Karina Kwiatek 2021-08-05 18:31:35 +02:00
parent 49c33486dd
commit faaab47859
3 changed files with 12 additions and 0 deletions

View File

@ -38,3 +38,7 @@
%a.dropdown-item{ href: '#', data: { a_id: a.id, action: 'ab-report' } } %a.dropdown-item{ href: '#', data: { a_id: a.id, action: 'ab-report' } }
%i.fa.fa-exclamation-triangle %i.fa.fa-exclamation-triangle
= t 'views.actions.report' = t 'views.actions.report'
- if current_user.has_role? :administrator
%a.dropdown-item{ href: rails_admin_path + "/answer/#{a.id}", target: '_blank' }
%i.fa.fa-gears
View in Kontrollzentrum

View File

@ -18,6 +18,10 @@
%a.dropdown-item{ href: '#', tabindex: -1, data: { action: 'ab-question-report', q_id: a.question.id } } %a.dropdown-item{ href: '#', tabindex: -1, data: { action: 'ab-question-report', q_id: a.question.id } }
%i.fa.fa-exclamation-triangle %i.fa.fa-exclamation-triangle
= t 'views.actions.report' = t 'views.actions.report'
- if current_user.has_role? :administrator
%a.dropdown-item{ href: rails_admin_path + "/question/#{a.question.id}", target: '_blank' }
%i.fa.fa-gears
View in Kontrollzentrum
%h6.text-muted.media-heading.answerbox__question-user %h6.text-muted.media-heading.answerbox__question-user
= raw t('views.answerbox.asked', user: user_screen_name(a.question.user, anonymous: a.question.author_is_anonymous), time: time_tooltip(a.question)) = raw t('views.answerbox.asked', user: user_screen_name(a.question.user, anonymous: a.question.author_is_anonymous), time: time_tooltip(a.question))
- if !a.question.author_is_anonymous && a.question.answer_count > 1 - if !a.question.author_is_anonymous && a.question.answer_count > 1

View File

@ -28,3 +28,7 @@
%a.dropdown-item{ href: '#', data: { target: '#modal-ban', toggle: :modal } } %a.dropdown-item{ href: '#', data: { target: '#modal-ban', toggle: :modal } }
%i.fa.fa-ban %i.fa.fa-ban
= t 'views.actions.ban' = t 'views.actions.ban'
- if current_user.has_role? :administrator
%a.dropdown-item{ href: rails_admin_path + "/user/#{user.id}", target: '_blank' }
%i.fa.fa-cogs
"View in Kontrollzentrum"