Bug 28512 - Quick spine label creator: Add CSS class with logged in library's branchcode
Summary: Quick spine label creator: Add CSS class with logged in library's branchcode
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Label/patron card printing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Lucas Gass
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 31633
  Show dependency treegraph
 
Reported: 2021-06-03 15:22 UTC by Lucas Gass
Modified: 2023-12-28 20:43 UTC (History)
2 users (show)

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


Attachments
Bug 28512: add logged in branch as class to spinelabel-print.tt body (1.80 KB, patch)
2021-06-03 15:28 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 28512: add logged in branch as class to spinelabel-print.tt body (1.86 KB, patch)
2022-04-21 04:08 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 28512: add logged in branch as class to spinelabel-print.tt body (1.91 KB, patch)
2022-04-25 12:15 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 28512: Add branchcode as class to spinelabel element (1.39 KB, patch)
2022-08-25 17:18 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 28512: Add branchcode as class to spinelabel element (1.45 KB, patch)
2022-09-12 18:30 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 28512: Add branchcode as class to spinelabel element (1.50 KB, patch)
2022-09-26 20:48 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 Lucas Gass 2021-06-03 15:22:55 UTC
spinelabel-print.tt does not include the normal header include therefore there is no information about the current logged in branch. 

It would be nice to be able to write CSS for labels specific to a given branch. It would be easy to add the logged in branch code as a class on the HTML body. This would allow for branch specific CSS for labels.
Comment 1 Lucas Gass 2021-06-03 15:28:14 UTC
Created attachment 121607 [details] [review]
Bug 28512: add logged in branch as class to spinelabel-print.tt body

To test:
-Apply patch and generate a quick spine label.
-Inscept the page and notice that the body should contain a new class which corresponds with that the of the logged in branch.
Comment 2 Aleisha Amohia 2022-04-21 04:08:42 UTC
Created attachment 133514 [details] [review]
Bug 28512: add logged in branch as class to spinelabel-print.tt body

To test:
-Apply patch and generate a quick spine label.
-Inscept the page and notice that the body should contain a new class which corresponds with that the of the logged in branch.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Comment 3 Katrin Fischer 2022-04-25 12:15:51 UTC
Created attachment 133762 [details] [review]
Bug 28512: add logged in branch as class to spinelabel-print.tt body

To test:
-Apply patch and generate a quick spine label.
-Inscept the page and notice that the body should contain a new class which corresponds with that the of the logged in branch.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Fridolin Somers 2022-05-04 21:24:16 UTC
Actually adding current logged in branch is only in OPAC and with a prefix 'branch-'.
It would be risky to do without this prefix. It can trigger an unwanted CSS rule.

For consistency, this should be added to all staff interface body tag.
Comment 5 Katrin Fischer 2022-05-05 08:19:07 UTC
Would you be ok with it being in another element instead of the body tag?

Adding to all staff pages is quite a huge task and I think a quick fix here would be nice for libraries.
Comment 6 Fridolin Somers 2022-05-05 09:31:33 UTC
(In reply to Katrin Fischer from comment #5)
> Would you be ok with it being in another element instead of the body tag?
> 
Good idea yep
Comment 7 Lucas Gass 2022-08-25 17:11:51 UTC
#spinelabel(In reply to Katrin Fischer from comment #5)
> Would you be ok with it being in another element instead of the body tag?
> 
> Adding to all staff pages is quite a huge task and I think a quick fix here
> would be nice for libraries.

<div id="spinelabel">

Maybe on this element?
Comment 8 Lucas Gass 2022-08-25 17:18:03 UTC
Created attachment 139801 [details] [review]
Bug 28512: Add branchcode as class to spinelabel element

To test:
-Apply patch and generate a quick spine label.
-Inscept the page and notice that the #spinelabel element should contain a new class which corresponds with that the of the logged in branch.
Comment 9 ByWater Sandboxes 2022-09-12 18:30:41 UTC
Created attachment 140503 [details] [review]
Bug 28512: Add branchcode as class to spinelabel element

To test:
-Apply patch and generate a quick spine label.
-Inscept the page and notice that the #spinelabel element should contain a new class which corresponds with that the of the logged in branch.

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Comment 10 Katrin Fischer 2022-09-26 20:47:58 UTC
I have a last doubt on this one: we don't show that it's the logged-in library here. One could think it was homebranch/holdingbranch - but not sure though how we could make it more clear.
Comment 11 Katrin Fischer 2022-09-26 20:48:27 UTC
Created attachment 141009 [details] [review]
Bug 28512: Add branchcode as class to spinelabel element

To test:
-Apply patch and generate a quick spine label.
-Inscept the page and notice that the #spinelabel element should contain a new class which corresponds with that the of the logged in branch.

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Andrew Fuerste-Henry 2022-09-27 13:13:20 UTC
(In reply to Katrin Fischer from comment #10)
> I have a last doubt on this one: we don't show that it's the logged-in
> library here. One could think it was homebranch/holdingbranch - but not sure
> though how we could make it more clear.

Just filed bug 31633 as a follow-up to add a method to select which branch gets applied. Probably a syspref? It's not hard to imagine different workflows in which a library would prefer the label format be defined based on any of these three branch choices.
Comment 13 Tomás Cohen Arazi 2022-10-03 13:09:49 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!