Bug 31633: Add holding and home data attributes to spinelabel-print.tt

To test:

1. Apply patch
2. Have some items with call numbers and different holding/home branches.
3. Generate some quick spine labels and use your browsers dev tools to inscept the #spinelabel element. It should have 2 new data-attributes, data-homebranch and data-holdingbranch
4. You can then apply this CSS via IntraNnetUserCSS to make sure you can select these properly now:

	background: red;
}

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Lucas Gass 2022-09-27 16:44:24 +00:00 committed by Tomas Cohen Arazi
parent 762fa03432
commit 67910eeb50
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
2 changed files with 5 additions and 1 deletions

View File

@ -22,7 +22,7 @@
</div>
[% ELSE %]
<body id="labels_spinelabel-print" class="tools labels">
<div id="spinelabel" class="[% Branches.GetLoggedInBranchcode | html %]">
<div id="spinelabel" class="[% Branches.GetLoggedInBranchcode | html %]" data-homebranch="[% itemhomebranch | html %]" data-holdingbranch="[% itemholdingbranch | html %]">
[% content | $raw %]
</div>
<div id="print_button" class="noprint">

View File

@ -82,6 +82,10 @@ while ( my ( $key, $value ) = each(%$data) ) {
$body = $scheme;
$template->param(
'itemhomebranch' => $item->{homebranch},
'itemholdingbranch' => $item->{holdingbranch}
);
$template->param( autoprint => C4::Context->preference("SpineLabelAutoPrint") );
$template->param( content => $body );