From c53520d58d9073ab6ad2fbf74a1d1cccf7d8918d Mon Sep 17 00:00:00 2001 From: Bernardo Gonzalez Kriegel Date: Tue, 29 Apr 2014 16:31:15 -0300 Subject: [PATCH] Bug 12062: Follow up to fix more untraslatable cases 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 Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- circ/hold-transfer-slip.pl | 1 + circ/transfer-slip.pl | 2 +- .../intranet-tmpl/prog/en/modules/circ/printslip.tt | 9 ++++++++- .../opac-tmpl/bootstrap/en/modules/sco/printslip.tt | 4 ++-- members/printslip.pl | 3 ++- opac/sco/printslip.pl | 2 +- 6 files changed, 15 insertions(+), 6 deletions(-) diff --git a/circ/hold-transfer-slip.pl b/circ/hold-transfer-slip.pl index 956fd14195..28de5e950f 100755 --- a/circ/hold-transfer-slip.pl +++ b/circ/hold-transfer-slip.pl @@ -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; diff --git a/circ/transfer-slip.pl b/circ/transfer-slip.pl index c8e97a0a6a..d9f22d302e 100755 --- a/circ/transfer-slip.pl +++ b/circ/transfer-slip.pl @@ -64,7 +64,7 @@ else { $template->param( slip => $slip, plain => !$is_html, - title => "Koha -- Circulation: Transfers", + caller => 'transfer', stylesheet => C4::Context->preference("SlipCSS"), ); 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 8603e16d98..7fc56fb1c3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt @@ -1,6 +1,13 @@ [% USE Koha %] [% INCLUDE 'doc-head-open.inc' %] -Koha › Circulation › Transfers +[% IF ( caller = 'hold-transfer' %] +Koha › Circulation › Hold transfer print receipt +[% ELSIF ( caller == 'transfer' %] +Koha › Circulation › Transfers print receipt +[% ELSIF ( caller == 'members' %] +Koha › Members › Print receipt for [% borrowernumber %] +[% END %] + diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/printslip.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/printslip.tt index 8ad25acf6e..8f02235926 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/printslip.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/printslip.tt @@ -1,5 +1,5 @@ [% INCLUDE 'doc-head-open.inc' %] -[% title %] +[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha [% END %] › Self checkout › Print Receipt for [% borrowernumber %] @@ -27,4 +27,4 @@ } - \ No newline at end of file + diff --git a/members/printslip.pl b/members/printslip.pl index 71fdda249d..7085d3846f 100755 --- a/members/printslip.pl +++ b/members/printslip.pl @@ -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, ); diff --git a/opac/sco/printslip.pl b/opac/sco/printslip.pl index e8a56859aa..62a79bbe1f 100755 --- a/opac/sco/printslip.pl +++ b/opac/sco/printslip.pl @@ -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; -- 2.39.5