Bug 13193: Make Memcached usage fork safe
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / labels / spinelabel-print.tt
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>
15
16         [% IF ( BarcodeNotFound ) %]
17                 <body id="labels_spinelabel-print" class="tools labels">
18             <div class="dialog message">The barcode [% Barcode | html %] was not found.</div>
19             <div id="print_button" class="noprint">
20                 <button class="btn btn-default close-window">Close</button>
21             </div>
22         [% ELSE %]
23             <body id="labels_spinelabel-print" class="tools labels">
24             <div id="spinelabel">
25                                 [% content | $raw %]
26             </div>
27             <div id="print_button" class="noprint">
28                 <button class="btn btn-default print-label"><i class="fa fa-print"></i> Print this label</button>
29             </div>
30         [% END %]
31
32 [% Asset.js( "lib/jquery/jquery-2.2.3.min.js" ) | $raw %]
33 [% Asset.js( "lib/jquery/jquery-migrate-1.3.0.min.js" ) | $raw %]
34 [% IF ( autoprint ) %]
35     [% INCLUDE 'slip-print.inc' #printThenClose %]
36 [% END %]
37 <script>
38     [% IntranetUserJS | $raw %]
39     $(document).ready(function(){
40         $(".print-label").on("click", function(e){
41             e.preventDefault();
42             window.print();
43             window.close();
44         });
45
46         $(".close-window").on("click", function(e){
47             e.preventDefault();
48             window.close();
49         });
50     });
51 </script>
52
53 [% INCLUDE 'popup-bottom.inc' %]