Koha/koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt
Owen Leonard 3da3e6e8ff
Bug 34453: Update background of quick spine label pop-up
This patch updates the quick spine label popup so that the footer uses
the same markup as the recently updated Z39.50 popup window in
cataloging.

To test, apply the patch and rebuild the staff interface CSS.

Go to Cataloging -> Quick spine label creator.

 - Test the form with both an existing barcode and a non-existent
   barcode.
   - In the pop-up window, confirm that the footer looks correct and
     that the buttons in the footer, in both cases, work correctly.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-09-22 11:35:48 -03:00

71 lines
2.6 KiB
Text

[% USE raw %]
[% USE Asset %]
[% USE Branches %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Spine labels &rsaquo; Tools &rsaquo; Koha</title>
[% INCLUDE 'doc-head-close.inc' popup => 1 %]
[% Asset.css("css/spinelabel.css") | $raw %]
<style>
@media print {
.noprint { display: none; }
}
</style>
[% IF ( IntranetUserCSS ) %]<style>[% IntranetUserCSS | $raw %]</style>[% END %]
</head>
[% IF ( BarcodeNotFound ) %]
<body id="labels_spinelabel-print" class="tools labels">
<div class="dialog message">The barcode [% Barcode | html %] was not found.</div>
<nav class="navbar navbar-default navbar-fixed-bottom noprint">
<div class="container-fluid">
<fieldset class="action">
<button class="btn btn-default close-window">Close</button>
</fieldset>
</div>
</nav>
[% ELSE %]
<body id="labels_spinelabel-print" class="tools labels">
<div id="spinelabel" class="[% Branches.GetLoggedInBranchcode | html %]" data-loggedinbranch="[% Branches.GetLoggedInBranchcode | html %]" data-homebranch="[% itemhomebranch | html %]" data-holdingbranch="[% itemholdingbranch | html %]">
[% content | $raw %]
</div>
<nav class="navbar navbar-default navbar-fixed-bottom noprint">
<div class="container-fluid">
<fieldset class="action">
<button class="btn btn-primary print-label"><i class="fa fa-print"></i> Print this label</button>
<button class="btn btn-default edit-label"><i class="fa fa-lock"></i> Edit this label</button>
</fieldset>
</div>
</nav>
[% END %]
[% Asset.js( "lib/jquery/jquery-3.6.0.min.js" ) | $raw %]
[% Asset.js( "lib/jquery/jquery-migrate-3.3.2.min.js" ) | $raw %]
[% IF ( autoprint ) %]
[% INCLUDE 'slip-print.inc' #printThenClose %]
[% END %]
<script>
$(document).ready(function(){
$(".print-label").on("click", function(e){
e.preventDefault();
window.print();
window.close();
});
$(".close-window").on("click", function(e){
e.preventDefault();
window.close();
});
$('.edit-label').click( function() {
$('#spinelabel').attr('contenteditable', function(index, attr){
return attr == 'true' ? null : 'true';
});
$('.edit-label .fa').toggleClass('fa-lock').toggleClass('fa-unlock');
});
});
</script>
[% INCLUDE 'popup-bottom.inc' %]