From e6ebf10bba5d9ebec0f8d9995df16d2eb384f44f Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Sat, 13 Nov 2010 13:42:35 -0500 Subject: [PATCH] Fix for Bug 4851 - Batch delete shouldn't show delete button if no items were found - Adding template flag to indicate valid results (hidden or not) - Clarifying warning messages based on various outcomes Signed-off-by: Galen Charlton Signed-off-by: Chris Cormack --- .../prog/en/modules/tools/batchMod-del.tmpl | 22 ++++++++++++------- tools/batchMod.pl | 3 +++ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tmpl index c6f82b95ad..441f4c5a78 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tmpl @@ -52,7 +52,9 @@ -

Warning, the following barcodes were not found :

+
+

Warning, the following barcodes were not found:

Warning: no barcodes were found

+
@@ -66,7 +68,7 @@
-

The following barcodes were found:

+

The following barcodes were found:

@@ -77,7 +79,7 @@ - +
@@ -111,17 +113,16 @@ - - + -

Too many items (): not displaying each one individually.

+

Too many items () to display individually.

" /> - +
" />

This will delete all thethe selected items.

@@ -131,10 +132,15 @@
Job progress:
0%
- + + + Cancel + +

Return to batch item deletion

+ diff --git a/tools/batchMod.pl b/tools/batchMod.pl index 9982e2d88c..b2007bcc2a 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -203,6 +203,9 @@ if ($op eq "show"){ } } + + # Flag to tell the template there are valid results, hidden or not + if(scalar(@itemnumbers) > 0){ $template->param("itemresults" => 1); } # Only display the items if there are no more than 1000 if (scalar(@itemnumbers) <= 1000) { $items_display_hashref=BuildItemsData(@itemnumbers); -- 2.39.5