From c1a985f347e269d6b09a85e2c8108c0015ed9056 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 22 Oct 2013 14:58:25 -0700 Subject: [PATCH] Bug 8033 - add print receipt option to Koha self-check (edit) Content-Type: text/plain; charset="utf-8" Reimplementation of Kyle's follow-up, minus the addition of "" which is I don't understand. From the original commit message: 3 misc follow-up fixes 1/ fixed printslip.tmpl typo 2/ moved hardcoded text string from script to template. 3/ delete unused receipt.tt file To Test: - Sign in to self checkout. - Enter a barcode and click submit. - Click the finish button - You should be prompted with a message asking if you would like a receipt. If you click OK you should be taken to the page with the receipt. If you click Cancel you should not see the reciept and you should be logged out. --- .../opac-tmpl/bootstrap/en/modules/sco/receipt.tt | 46 ---------------- koha-tmpl/opac-tmpl/prog/en/modules/sco/receipt.tt | 57 -------------------- opac/sco/printslip.pl | 4 +- 3 files changed, 2 insertions(+), 105 deletions(-) delete mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/receipt.tt delete mode 100644 koha-tmpl/opac-tmpl/prog/en/modules/sco/receipt.tt diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/receipt.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/receipt.tt deleted file mode 100644 index 3a28694..0000000 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/receipt.tt +++ /dev/null @@ -1,46 +0,0 @@ -<!DOCTYPE html> -[% IF ( bidi ) %]<html lang="[% lang %]" dir="[% bidi %]">[% ELSE %]<html lang="[% lang %]">[% END %] -<head> -<title>RECEIPT - - -[% IF ( SCOUserCSS ) %][% END %] -[% IF ( SCOUserJS ) %][% END %] - - - - - -[% branchname %]

-[% cardnumber %]
- -[% IF ( todayissues ) %]
-

Today's checkouts

-[% FOREACH todayissue IN todayissues %]
-[% todayissue.title |html %]
-[% todayissue.author %]
-[% todayissue.dd %]
-[% todayissue.barcode %]
-[% END %] -[% END %] - - - - -[% BLOCK jsinclude %] -[% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/sco/receipt.tt b/koha-tmpl/opac-tmpl/prog/en/modules/sco/receipt.tt deleted file mode 100644 index 8339b35..0000000 --- a/koha-tmpl/opac-tmpl/prog/en/modules/sco/receipt.tt +++ /dev/null @@ -1,57 +0,0 @@ - - - - - RECEIPT - - - -[% IF ( SCOUserCSS ) %][% END %] -[% IF ( SCOUserJS ) %][% END %] - - - - - -[% branchname %]

-[% cardnumber %]
- - -[% IF ( todayissues ) %]
-

Today's checkouts

-[% FOREACH todayissue IN todayissues %]
-[% todayissue.title |html %]
-[% todayissue.author %]
-[% todayissue.dd %]
-[% todayissue.barcode %]
-[% END %] -[% END %] - - - - - - - diff --git a/opac/sco/printslip.pl b/opac/sco/printslip.pl index e8a5685..09c6c6a 100755 --- a/opac/sco/printslip.pl +++ b/opac/sco/printslip.pl @@ -45,7 +45,7 @@ my $error = $input->param('error'); # patrons still need to be able to print receipts my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { - template_name => "/sco/printslip.tmpl", + template_name => "/sco/printslip.tt", query => $input, type => "opac", } @@ -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; -- 1.7.9.5