From bfaa8776a2037f0571c5304756e71a9b93777efa Mon Sep 17 00:00:00 2001
From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Date: Tue, 22 Apr 2014 08:22:14 -0300
Subject: [PATCH] Bug 12062 - Untranslatable "Reserve not found"

This patch rewrites transfer slip code to make some
strings translatable.
Also simplifies some code and parameters.

To test:
1) Produce a transfer slip, no changes must be noted.

2) Update PO file, new strings
msgid "%s %s%s%sNo hold found%s %s %s "
msgid "%s%s%sNo hold found%s "
msgid "Koha &rsaquo; Circulation &rsaquo; Transfers"
---
 circ/hold-transfer-slip.pl                         |   14 ++------------
 .../prog/en/modules/circ/printslip.tt              |   10 +++++-----
 2 files changed, 7 insertions(+), 17 deletions(-)

diff --git a/circ/hold-transfer-slip.pl b/circ/hold-transfer-slip.pl
index 8ae5d2a..956fd14 100755
--- a/circ/hold-transfer-slip.pl
+++ b/circ/hold-transfer-slip.pl
@@ -57,18 +57,8 @@ if ( my $letter = ReserveSlip ($session->param('branch') || $userenv->{branch},
     $slip = $letter->{content};
     $is_html = $letter->{is_html};
 }
-else {
-    $slip = "Reserve not found";
-}
-$template->param(
-    slip => $slip,
-    plain => !$is_html,
-    title => "Koha -- Circulation: Transfers",
-    stylesheet => C4::Context->preference("SlipCSS"),
-);
+$template->param( slip => $slip ) if ($slip);
+$template->param( plain => !$is_html );
 
 output_html_with_http_headers $input, $cookie, $template->output;
 
-
-
-
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt
index 7dc5b81..a2c01ea 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt
@@ -1,11 +1,11 @@
 [% USE Koha %]
 [% INCLUDE 'doc-head-open.inc' %]
-<title>[% title %]</title>
+<title>Koha &rsaquo; Circulation &rsaquo; Transfers</title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% interface %]/[% theme %]/img/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 %]" />
+[% IF ( Koha.Preference('SlipCSS') ) %]
+<link rel="stylesheet" type="text/css" href="[% Koha.Preference('SlipCSS') %]" />
 [% END %]
 
 <script type="text/javascript">
@@ -24,10 +24,10 @@
 
 [% IF plain %]
 <pre>
-[% slip %]
+[% IF ( slip ) %][% slip %][% ELSE %]No hold found[% END %]
 </pre>
 [% ELSE %]
-[% slip %]
+[% IF ( slip ) %][% slip %][% ELSE %]No hold found[% END %]
 [% END %]
 
 [% INCLUDE 'intranet-bottom.inc' %]
-- 
1.7.9.5