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 <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Fridolin Somers 2020-09-25 09:43:54 +02:00 committed by Jonathan Druart
parent 7972be4b97
commit 26c717fcd4
2 changed files with 17 additions and 2 deletions

View File

@ -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 {

View File

@ -2,7 +2,15 @@
[% USE KohaDates %]
[% PROCESS 'member-display-address-style.inc' %]
[% IF ( patron.borrowernumber ) %]
<div class="patroninfo"><h5>[% INCLUDE 'patron-title.inc' %]</h5>
[% SET patrongrade = ( patron.has_permission({ 'catalogue' => 1 }) ) ? 'staffgrade' : 'normalgrade' %]
<div class="patroninfo [% patrongrade | html %]">
<h5>
[% IF ( patrongrade == 'staffgrade' ) %]
<i class="fa fa-shield" title="Staff patron"></i>
[% END %]
[% INCLUDE 'patron-title.inc' %]
</h5>
[% IF Koha.Preference('showLastPatron') %]
<input type="hidden" id="hiddenborrowernumber" value="[% patron.borrowernumber | html %]">