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.
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.
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>
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>
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.
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.
(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
#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?
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.
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>
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.
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>
(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.
Pushed to master for 22.11. Nice work everyone, thanks!