From e7c134e27e044ad4ebe9a0e4aa220f4a05208215 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Thu, 15 Oct 2020 10:48:52 +0200 Subject: [PATCH] Bug 26687: Add a Font Awesome icon for superlibrarian patrons MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Bug 26534 adds a shield Font Awesome icon to help identify staff patrons. I propose to add an icon when patron is a superlibrarian. Patch adds 'is-superlibrarian' class that may be used for more CSS tuning. Test plan: 1) Compare display between a patron A beeing superlibarian and a patron B having only staff interface access 2) Patron B has only shield icon 3) Patron A has shield icon and bolt icon 4) Check a patron without permissions has no shield icon Signed-off-by: Séverine QUEUNE Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../intranet-tmpl/prog/en/includes/circ-menu.inc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 17f8f36f11..a35b058607 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc @@ -3,7 +3,13 @@ [% PROCESS 'member-display-address-style.inc' %] [% IF ( patron.borrowernumber ) %] [% SET patron_is_staff = patron.has_permission({ 'catalogue' => 1 }) %] -[% SET patron_type_class = patron_is_staff ? 'is-staff' : 'is-not-staff' %] +[% SET patron_is_superlibrarian = patron.is_superlibrarian %] +[% SET patron_type_class = 'is-not-staff' %] +[% IF ( patron_is_superlibrarian ) %] + [% patron_type_class = 'is-staff is-superlibrarian' %] +[% ELSIF ( patron_is_staff ) %] + [% patron_type_class = 'is-staff' %] +[% END %]
[% IF ( patronimages ) %] @@ -14,6 +20,9 @@ [% IF ( patron_is_staff ) %] [% END %] + [% IF ( patron_is_superlibrarian ) %] + + [% END %] [% INCLUDE 'patron-title.inc' %] -- 2.39.5