Bug 13128 - Add span with id for logged in branch name, add hidden span for branchcode
Summary: Add span with id for logged in branch name, add hidden span for branchcode
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Kyle M Hall (khall)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-22 13:07 UTC by Kyle M Hall (khall)
Modified: 2015-06-04 23:32 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 13128 - Add span with id for logged in branch name, add hidden span for branchcode (2.59 KB, patch)
2014-10-22 13:10 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 13128 - Add span with id for logged in branch name, add hidden span for branchcode (2.70 KB, patch)
2014-10-22 14:00 UTC, Owen Leonard
Details | Diff | Splinter Review
[PASSED QA] Bug 13128 - Add span with id for logged in branch name, add hidden span for branchcode (2.75 KB, patch)
2014-10-25 19:10 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall (khall) 2014-10-22 13:07:58 UTC
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
Comment 1 Kyle M Hall (khall) 2014-10-22 13:10:46 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2014-10-22 14:00:04 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2014-10-25 19:10:20 UTC
Created attachment 32741 [details] [review]
[PASSED QA] Bug 13128 - Add span with id for logged in branch name, add hidden span for branchcode

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.
Comment 4 Tomás Cohen Arazi (tcohen) 2014-10-27 15:32:58 UTC
Patch pushed to master.

Thanks Kyle!