It would be nice if there were a simple way to access the name and
branchcode of the currently logged in library, as well as the logged in
user via JavaScript ( via intranetuserjs ).
I propose the following:
1) Remove the whitespace surrounding the loggedinusername span
2) Wrap the logged in branch name with a span that has an id
3) Add the branchcode in a hidden span that has an id
Test Plan:
1) Apply this patch
2) Log into Koha
3) Inspect the html source code
4) Note the lack of whitespace within the tag <span class="loggedinusername">[% loggedinusername %]</span>
5) Note the logged in branch name is now surrounded by a span with an id
6) Note below that is a span containing the branchcode, also with an id.
7) Verify the branchcode span is hidden by default.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Small template change, no problems found.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
+[% USE Branches %]
<div id="header" class="navbar navbar-static-top">
<div class="navbar-inner">
<ul id="toplevelmenu" class="nav">
<li class="dropdown">
<a href="#" id="drop3" role="button" class="dropdown-toggle" data-toggle="dropdown">
[% IF ( loggedinusername ) %]
- <span class="loggedinusername">
- [% loggedinusername %]
- </span>
+ <span class="loggedinusername">[% loggedinusername %]</span>
<span class="separator">|</span>
[% IF ( AutoLocation ) %]
<brand>
[% IF ( LoginBranchname == 'NO_LIBRARY_SET' ) %]
NO LIBRARY SET
[% ELSE %]
- [% LoginBranchname %]
+ <span id="logged-in-branch-name">[% LoginBranchname %]</span>
+ <span id="logged-in-branch-code" class="content_hidden">[% Branches.GetLoggedInBranchcode %]</span>
[% END %]
</strong>
[% END %]