From 53cdb4ebaa32827a93e7f8c152aa72711fdb1fa0 Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Tue, 26 Feb 2008 10:24:40 +1300 Subject: [PATCH] Bugfix for 1814: Correcting the way we handle a case where no label batches exist to better inform the user. Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- C4/Labels.pm | 9 ++++++--- .../prog/en/modules/labels/label-manager.tmpl | 7 +++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/C4/Labels.pm b/C4/Labels.pm index 7a1d60bef0..bdbce82444 100644 --- a/C4/Labels.pm +++ b/C4/Labels.pm @@ -308,10 +308,12 @@ sub get_batches { } $sth->finish; +# Not sure why we are doing this rather than simply telling the user that no batches are currently defined. +# So I'm commenting this out and modifying label-manager.tmpl to properly inform the user as stated. -fbcit # adding a dummy batch=1 value , if none exists in the db - if ( !scalar(@resultsloop) ) { - push( @resultsloop, { batch_id => '1' , num => '0' } ); - } +# if ( !scalar(@resultsloop) ) { +# push( @resultsloop, { batch_id => '1' , num => '0' } ); +# } return @resultsloop; } @@ -852,6 +854,7 @@ my $layout_id = $$conf_data->{'id'}; my $str_fields = get_text_fields($layout_id, 'codes' ); my @fields = split(/ /, $str_fields); +#warn Dumper(@fields); ### @fields my $vPos = ( $y_pos + ( $label_height - $top_text_margin ) ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manager.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manager.tmpl index 6c3fa67c7f..8e76163913 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manager.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manager.tmpl @@ -59,7 +59,14 @@ function Plugin(batch_id) { +
+
+

No Label Batches Currently Defined

+
+
+
+
-- 2.39.5