From 9f3ecc8a29edd808d6086cbd4d44a0ab6a2c7ed0 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 3 Aug 2009 16:26:26 +0000 Subject: [PATCH] Quick Spine Label Printer - Minors fixes This new version of the patch does away with the need for 2 spinelabel css files. This patch address two points brought up: [1] (minor) if an item is not found, it should say so and return to spinelabel-home.pl, not show an empty label [2] (minor) can the print button be excluded from the printout? Signed-off-by: Galen Charlton --- .../en/modules/labels/spinelabel-print.tmpl | 29 ++++++++++++++----- labels/spinelabel-print.pl | 5 ++++ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-print.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-print.tmpl index 8897435219..1530f43f92 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-print.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-print.tmpl @@ -2,13 +2,26 @@ Koha › Tools › Spine Labels /css/spinelabel.css" /> + + - onLoad="window.print()" - - -
-
- + + +

The barcode was not found.

+

Return To Spine Label Printer

+ + + onLoad="window.print()" + + +
+
+ + \ No newline at end of file diff --git a/labels/spinelabel-print.pl b/labels/spinelabel-print.pl index 1cfa103356..82c6d51fda 100755 --- a/labels/spinelabel-print.pl +++ b/labels/spinelabel-print.pl @@ -48,6 +48,11 @@ $sth = $dbh->prepare($sql); $sth->execute($barcode); $item = $sth->fetchrow_hashref; +if ( $item->{'itemnumber'} eq '' ) { + $template->param( 'Barcode' => $barcode ); + $template->param( 'BarcodeNotFound' => 1 ); +} + my $body; my $data;