From febd5dcc8d21cc27d7fc832fe4034d39e678fad2 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Fri, 25 Sep 2020 09:43:54 +0200 Subject: [PATCH] Bug 26534: Add Font Awesome icon only for staff patrons In patron pages it would help to see an icon indicating that this is a staff patron (having permission to access staff interface). This may avoid wrong patron deletion or permission mistakes. I propose the shield Font Awesome icon and a grey background Patch also shows patron name and cardnumber aligned center instead of right. Patch adds to 'patroninfo' div a class 'staffgrade' or 'normalgrade' to allow more styling depending on patron beeing staff or not. Test plan: Compare display between a patron having staff interface access and one without permissions. --- koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss | 9 ++++++++- koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc | 10 +++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss index 9a7470546e..f1efcf4c33 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -1381,11 +1381,12 @@ dd { margin-top: -.5em; h5 { + text-align: center; border-right: 1px solid #B9D8D9; margin-bottom: 0; padding-bottom: .5em; padding-left: -.5em; - padding-top: .3em; + padding-top: .5em; &:empty { border-right: 0; @@ -1414,6 +1415,12 @@ dd { border-right: 1px solid #B9D8D9; width: 100%; } + + + .staffgrade { + h5 { + background-color: #EEE; + } + } } .patroninfo-section { diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc index a12be5e07f..ec23e4f3b4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc @@ -2,7 +2,15 @@ [% USE KohaDates %] [% PROCESS 'member-display-address-style.inc' %] [% IF ( patron.borrowernumber ) %] -
[% INCLUDE 'patron-title.inc' %]
+[% SET patrongrade = ( patron.has_permission({ 'catalogue' => 1 }) ) ? 'staffgrade' : 'normalgrade' %] +
+ +
+ [% IF ( patrongrade == 'staffgrade' ) %] + + [% END %] + [% INCLUDE 'patron-title.inc' %] +
[% IF Koha.Preference('showLastPatron') %] -- 2.27.0