From 44a4a2b08429017208706b65e403e8c986158c64 Mon Sep 17 00:00:00 2001
From: Lucas Gass <lucas@bywatersolutions.com>
Date: Thu, 25 Aug 2022 17:15:29 +0000
Subject: [PATCH] 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>
---
 .../intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt
index eac2ff3fbe..6a48276f57 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt
@@ -1,5 +1,6 @@
 [% USE raw %]
 [% USE Asset %]
+[% USE Branches %]
 [% SET footerjs = 1 %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Spine labels &rsaquo; Tools &rsaquo; Koha</title>
@@ -21,7 +22,7 @@
             </div>
 	[% ELSE %]
             <body id="labels_spinelabel-print" class="tools labels">
-            <div id="spinelabel">
+            <div id="spinelabel" class="[% Branches.GetLoggedInBranchcode | html %]">
 				[% content | $raw %]
             </div>
             <div id="print_button" class="noprint">
-- 
2.30.2