Bug 23464: Update the process of quick spine label printing
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / labels / spinelabel-print.tt
blob089a94d95bf88ee44da449cf1adf547e49969b14
1 [% USE raw %]
2 [% USE Asset %]
3 [% SET footerjs = 1 %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha &rsaquo; Tools &rsaquo; Spine labels</title>
6 [% INCLUDE 'doc-head-close.inc' popup => 1 %]
7 [% Asset.css("css/spinelabel.css") | $raw %]
8 <style>
9     @media print {
10         .noprint { display: none; }
11     }
12 </style>
13 [% IF ( IntranetUserCSS ) %]<style>[% IntranetUserCSS | $raw %]</style>[% END %]
14 </head>
16         [% IF ( BarcodeNotFound ) %]
17                 <body id="labels_spinelabel-print" class="tools labels">
18             <p>The barcode [% Barcode | html %] was not found.</p>
19             <p><a href="spinelabel-home.pl">Return to spine label printer</a></p>
20         [% ELSE %]
21             <body id="labels_spinelabel-print" class="tools labels">
22             <div id="spinelabel">
23                                 [% content | $raw %]
24             </div>
25             <div id="print_button" class="noprint">
26                 <button class="btn btn-default print-label" onclick="window.print()"><i class="fa fa-print"></i> Print this label</button>
27             </div>
28         [% END %]
30 [% IF ( IntranetUserJS ) %]
31     [% Asset.js( "lib/jquery/jquery-2.2.3.min.js" ) | $raw %]
32     [% Asset.js( "lib/jquery/jquery-migrate-1.3.0.min.js" ) | $raw %]
33     [% IF ( autoprint ) %]
34         [% INCLUDE 'slip-print.inc' #printThenClose %]
35     [% END %]
36     <script>
37         [% IntranetUserJS | $raw %]
38         $(document).ready(function(){
39             $(".print-label").on("click", function(e){
40                 e.preventDefault();
41                 window.print();
42                 window.close();
43             });
44         });
45     </script>
46 [% END %]
48 [% INCLUDE 'popup-bottom.inc' %]