Bug 22765: Add class beside loggedinusername to indicate if logged in user is a superlibrarian

It would be useful to know if a logged in user is a superlibrarian for the purpose of customization
using Javascript and CSS.

Test Plan:
1) Apply this patch, restart all the things
2) Log in as a superlibraraian
3) Note the new class 'is_superlibrarian' next to the 'loggedinusername' class
4) Log in as a non-superlibrarian
5) Note the new class is not present

Signed-off-by: Barton Chittenden <barton@bywatersolutions.com>

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Kyle Hall 2019-04-24 09:51:36 -04:00 committed by Nick Clemens
parent bfce1fea96
commit 90f8eb626d

View file

@ -69,7 +69,8 @@
<i class="fa fa-user"></i>
</span>
<span id="logged-in-info-full">
<span class="loggedinusername">[% logged_in_user.userid | html %]</span>
[% SET is_superlibrarian = CAN_user_superlibrarian ? 'is_superlibrarian' : '' %]
<span class="loggedinusername [% is_superlibrarian | html %]">[% logged_in_user.userid | html %]</span>
<span class="separator">|</span>
[% IF ( AutoLocation ) %]
<brand>