Bug 12062: Follow up to fix more untraslatable cases
authorBernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tue, 29 Apr 2014 19:31:15 +0000 (16:31 -0300)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 7 Jul 2014 13:32:08 +0000 (10:32 -0300)
This patch modifies staff printslip.tt to take into account
caller. Also fixes similar problem on opac printslip.tt

To test:
staff
1. Print hold transfer slip
2. Print transfer slip
3. Print member slip
opac
4. Print self checkout slip

5. Update translation files, check new strings are present

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
circ/hold-transfer-slip.pl
circ/transfer-slip.pl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/printslip.tt
members/printslip.pl
opac/sco/printslip.pl

index 956fd14..28de5e9 100755 (executable)
@@ -58,6 +58,7 @@ if ( my $letter = ReserveSlip ($session->param('branch') || $userenv->{branch},
     $is_html = $letter->{is_html};
 }
 $template->param( slip => $slip ) if ($slip);
+$template->param( caller => 'hold-transfer' );
 $template->param( plain => !$is_html );
 
 output_html_with_http_headers $input, $cookie, $template->output;
index c8e97a0..d9f22d3 100755 (executable)
@@ -64,7 +64,7 @@ else {
 $template->param(
     slip => $slip,
     plain => !$is_html,
-    title => "Koha -- Circulation: Transfers",
+    caller => 'transfer',
     stylesheet => C4::Context->preference("SlipCSS"),
 );
 
index 8603e16..7fc56fb 100644 (file)
@@ -1,6 +1,13 @@
 [% USE Koha %]
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Circulation &rsaquo; Transfers</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; Members &rsaquo; Print receipt for [% borrowernumber %]</title>
+[% END %]
+
 <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" />
index 8ad25ac..8f02235 100644 (file)
@@ -1,5 +1,5 @@
 [% INCLUDE 'doc-head-open.inc' %]
-[% title %]</title>
+[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha [% END %] &rsaquo; Self checkout &rsaquo; Print Receipt for [% borrowernumber %]</title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <link rel="shortcut icon" href="[% IF ( OpacFavicon  ) %][% OpacFavicon  %][% ELSE %][% interface %]/[% theme %]/images/favicon.ico[% END %]" type="image/x-icon" />
 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/print.css" />
@@ -27,4 +27,4 @@
     }
 </script>
 </body>
-</html>
\ No newline at end of file
+</html>
index 71fdda2..7085d38 100755 (executable)
@@ -84,7 +84,8 @@ if (my $letter = IssueSlip ($session->param('branch') || $branch, $borrowernumbe
 $template->param(
     slip => $slip,
     plain => !$is_html,
-    title => "Print Receipt for $borrowernumber",
+    borrowernumber => $borrowernumber,
+    caller => 'members',
     stylesheet => C4::Context->preference("SlipCSS"),
     error           => $error,
 );
index e8a5685..62a79bb 100755 (executable)
@@ -61,7 +61,7 @@ if (my $letter = IssueSlip ($session->param('branch') || $branch, $borrowernumbe
 
 $template->{VARS}->{slip} = $slip;
 $template->{VARS}->{plain} = !$is_html;
-$template->{VARS}->{title} = "Print Receipt for $borrowernumber";
+$template->{VARS}->{borrowernumber} = $borrowernumber;
 $template->{VARS}->{stylesheet} = C4::Context->preference("SlipCSS");
 $template->{VARS}->{error} = $error;