Bug 21526: Use the 'url' filter when needed
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / printslip.tt
index 7b29d4e..d6c38ec 100644 (file)
@@ -1,32 +1,35 @@
+[% USE raw %]
+[% USE Asset %]
+[% USE Koha %]
 [% INCLUDE 'doc-head-open.inc' %]
-<title>[% title %]</title>
+[% IF ( caller == 'hold-transfer' ) %]
+<title>Koha &rsaquo; Circulation &rsaquo; Hold transfer print receipt</title>
+[% ELSIF ( caller == 'transfer' ) %]
+<title>Koha &rsaquo; Circulation &rsaquo; Transfers print receipt</title>
+[% ELSIF ( caller == 'members' ) %]
+<title>Koha &rsaquo; Patrons &rsaquo; Print receipt for [% borrowernumber | html %]</title>
+[% ELSIF ( title ) %][%# FIXME title is never defined %]
+<title>Koha &rsaquo; Patrons &rsaquo; [% title | html %]</title>
+[% END %]
+[% INCLUDE 'doc-head-close.inc' %]
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% themelang %]/includes/favicon.ico[% END %]" type="image/x-icon" />
-<link rel="stylesheet" type="text/css" href="[% themelang %]/css/print.css" />
-[% IF stylesheet %]
-<link rel="stylesheet" type="text/css" href="[% stylesheet %]" />
+<link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon | %][% ELSE %][% interface | html %]/[% theme | html %]/img/favicon.ico[% END %]" type="image/x-icon" />
+[% Asset.css("css/print.css") | $raw %]
+[% IF ( Koha.Preference('SlipCSS') ) %]
+<link rel="stylesheet" type="text/css" href="[% Koha.Preference('SlipCSS') | $raw %]" />
 [% END %]
 
-<script language="javascript">
-[% IF ( IntranetSlipPrinterJS ) %]
-    [% IntranetSlipPrinterJS %]
-[% ELSE %]
-     function printThenClose() {
-         window.print();
-         window.close();
-     }
-[% END %]
-</script>
+[% INCLUDE 'slip-print.inc' #printThenClose %]
 </head>
-<body id="circ_printslip" class="circ" onload="printThenClose();">
+<body id="circ_printslip" class="circ">
 <div id="receipt">
 
 [% IF plain %]
 <pre>
-[% slip %]
+[% IF ( slip ) %][% slip | html %][% ELSE %]No slip template found[% END %]
 </pre>
 [% ELSE %]
-[% slip %]
+[% IF ( slip ) %][% slip | $raw %][% ELSE %]No slip template found[% END %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]