From 9d2957bdbe3fb54b34441768fc03d489d67c434e Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 31 Dec 2008 14:46:09 -0600 Subject: [PATCH] followup to Mason's labels patch * fix XHTML errors * fix problems with paging through results list Signed-off-by: Galen Charlton --- .../prog/en/modules/labels/result.tmpl | 12 ++-- .../prog/en/modules/labels/search.tmpl | 70 ++----------------- labels/label-item-search.pl | 36 +++++----- 3 files changed, 30 insertions(+), 88 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/result.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/result.tmpl index b563d41c61..7cf4f6346e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/result.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/result.tmpl @@ -73,18 +73,17 @@ function add_item3(i_itemnumber){ No results found -

-
,''); return false" />
Select AllClear All
+
,''); return false" />
Select AllClear All
" /> - +
@@ -103,8 +102,10 @@ function add_item3(i_itemnumber){ + + - + @@ -114,9 +115,11 @@ function add_item3(i_itemnumber){ +
Barcode


+

@@ -139,5 +142,4 @@ function add_item3(i_itemnumber){

- diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tmpl index 9abc5ad96b..4cf788847a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/search.tmpl @@ -67,52 +67,7 @@ to add to Batch - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FIXME: script doesn't "catch" q param - --> + @@ -120,12 +75,10 @@ to add to Batch
Sort by:

@@ -140,7 +93,7 @@ to add to Batch - /lib/calendar/cal.gif" border="0" id="openCalendarFrom" style="cursor: pointer;" valign="top" /> + /lib/calendar/cal.gif" border="0" id="openCalendarFrom" alt="Show Calendar" /> - - - - - - - -
--> + diff --git a/labels/label-item-search.pl b/labels/label-item-search.pl index 31b1d22add..7dc1ccd563 100755 --- a/labels/label-item-search.pl +++ b/labels/label-item-search.pl @@ -203,26 +203,28 @@ if ($show_results) { : $startfrom + $resultsperpage - 1; # multi page display - my $displaynext = 0; - my $displayprev = $startfrom; + $displaynext = 0; + $displayprev = $startfrom > 1 ? $startfrom : 0; - $displaynext = 1 if (scalar @results == $resultsperpage); + $displaynext = 1 if $to < $total_hits; - $template->param( - - total => $total_hits, - from => $from, - to => $to, - startfromnext => $startfromnext, - startfromprev => $startfromprev, - startfrom => $startfrom, - displaynext => $displaynext, - displayprev => $displayprev, - resultsperpage => $resultsperpage, - numbers => \@numbers, + } else { + $displayprev = 0; + $displaynext = 0; + } - ); - } + $template->param( + total => $total_hits, + from => $from, + to => $to, + startfromnext => $startfromnext, + startfromprev => $startfromprev, + startfrom => $startfrom, + displaynext => $displaynext, + displayprev => $displayprev, + resultsperpage => $resultsperpage, + numbers => \@numbers, + ); $template->param( result => \@results, -- 2.39.5