Bugzilla – Attachment 32577 Details for
Bug 13128
Add span with id for logged in branch name, add hidden span for branchcode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 13128 - Add span with id for logged in branch name, add hidden span for branchcode
SIGNED-OFF-Bug-13128---Add-span-with-id-for-logged.patch (text/plain), 2.70 KB, created by
Owen Leonard
on 2014-10-22 14:00:04 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 13128 - Add span with id for logged in branch name, add hidden span for branchcode
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2014-10-22 14:00:04 UTC
Size:
2.70 KB
patch
obsolete
>From 3167a955005252b081131f3efdb266aa390040ba Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 22 Oct 2014 00:18:27 -0400 >Subject: [PATCH] [SIGNED-OFF] Bug 13128 - Add span with id for logged in > branch name, add hidden span for branchcode >Content-Type: text/plain; charset="utf-8" > >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> >--- > .../intranet-tmpl/prog/en/includes/header.inc | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc >index b8bd714..b1de549 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc >@@ -1,3 +1,4 @@ >+[% USE Branches %] > <div id="header" class="navbar navbar-static-top"> > <div class="navbar-inner"> > <ul id="toplevelmenu" class="nav"> >@@ -42,9 +43,7 @@ > <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> >@@ -55,7 +54,8 @@ > [% 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 %] >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13128
:
32576
|
32577
|
32741