From 26c717fcd4b2031a8ddb0a06209bd29c18dbd3fe 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. Signed-off-by: David Nind Signed-off-by: Martin Renvoize Signed-off-by: David Nind Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- 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 57c0d58cd1..df7a2558a3 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -1380,11 +1380,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; @@ -1413,6 +1414,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.39.5