Bugzilla – Attachment 17697 Details for
Bug 10044
Doubled up paging on order receive
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
MT10144: Remove duplicate pagination on the pending orders page.
MT10144-Remove-duplicate-pagination-on-the-pending.patch (text/plain), 4.56 KB, created by
Jonathan Druart
on 2013-04-26 12:00:52 UTC
(
hide
)
Description:
MT10144: Remove duplicate pagination on the pending orders page.
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-04-26 12:00:52 UTC
Size:
4.56 KB
patch
obsolete
>From e938815adc85a722de7696d79829e02b68ae7189 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Fri, 26 Apr 2013 13:59:18 +0200 >Subject: [PATCH] MT10144: Remove duplicate pagination on the pending orders > page. > >Test plan: >Check that there is just one pagination on the pending orders page. > >http://bugs.koha-community.org/show_bug.cgi?id=10044 >--- > acqui/parcel.pl | 40 +------------------- > .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 19 +--------- > 2 files changed, 3 insertions(+), 56 deletions(-) > >diff --git a/acqui/parcel.pl b/acqui/parcel.pl >index 15578a9..8e82283 100755 >--- a/acqui/parcel.pl >+++ b/acqui/parcel.pl >@@ -136,10 +136,6 @@ my $datereceived = C4::Dates->new(); > my $code = $input->param('code'); > my @rcv_err = $input->param('error'); > my @rcv_err_barcode = $input->param('error_bc'); >-my $startfrom=$input->param('startfrom'); >-my $resultsperpage = $input->param('resultsperpage'); >-$resultsperpage = 20 unless ($resultsperpage); >-$startfrom=0 unless ($startfrom); > > > >@@ -281,40 +277,7 @@ if(!defined $invoice->{closedate}) { > my $budget = GetBudget( $line{budget_id} ); > $line{budget_name} = $budget->{'budget_name'}; > >- push @loop_orders, \%line if ($i >= $startfrom and $i < $startfrom + $resultsperpage); >- } >- >- my $count = $countpendings; >- >- if ($count>$resultsperpage){ >- my $displaynext=0; >- my $displayprev=$startfrom; >- if(($count - ($startfrom+$resultsperpage)) > 0 ) { >- $displaynext = 1; >- } >- >- my @numbers = (); >- for (my $i=1; $i<$count/$resultsperpage+1; $i++) { >- my $highlight=0; >- ($startfrom/$resultsperpage==($i-1)) && ($highlight=1); >- push @numbers, { number => $i, >- highlight => $highlight , >- startfrom => ($i-1)*$resultsperpage}; >- } >- >- my $from = $startfrom*$resultsperpage+1; >- my $to; >- if($count < (($startfrom+1)*$resultsperpage)){ >- $to = $count; >- } else { >- $to = (($startfrom+1)*$resultsperpage); >- } >- $template->param(numbers=>\@numbers, >- displaynext=>$displaynext, >- displayprev=>$displayprev, >- nextstartfrom=>(($startfrom+$resultsperpage<$count)?$startfrom+$resultsperpage:$count), >- prevstartfrom=>(($startfrom-$resultsperpage>0)?$startfrom-$resultsperpage:0) >- ); >+ push @loop_orders, \%line; > } > > $template->param( >@@ -337,7 +300,6 @@ $template->param( > book_foot_loop => \@book_foot_loop, > totalprice => sprintf($cfstr, $totalprice), > totalquantity => $totalquantity, >- resultsperpage => $resultsperpage, > (uc(C4::Context->preference("marcflavour"))) => 1, > total_quantity => $total_quantity, > total_gste => sprintf( "%.2f", $total_gste ), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >index fae8473..415c7e8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >@@ -240,23 +240,8 @@ > </tr> > [% END %] > </tbody> >- </table>[% ELSE %]There are no pending orders.[% END %] >- <div id="resultnumber"> >- <!-- Row of numbers corresponding to search result pages --> >- [% IF ( displayprev ) %] >- <a href="parcel.pl?invoiceid=[% invoiceid %]&startfrom=[% prevstartfrom %][% IF ( resultsperpage ) %]&resultsperpage=[% resultsperpage %][% END %]#resultnumber"><< Previous</a> >- [% END %] >- [% FOREACH number IN numbers %] >- [% IF ( number.highlight ) %] >- <span class="current">[% number.number %]</span> >- [% ELSE %] >- <a href="parcel.pl?invoiceid=[% invoiceid %]&startfrom=[% number.startfrom %][% IF ( resultsperpage ) %]&resultsperpage=[% resultsperpage %][% END %]#resultnumber">[% number.number %]</a> >- [% END %] >- [% END %] >- [% IF ( displaynext ) %] >- <a href="parcel.pl?invoiceid=[% invoiceid %]&startfrom=[% nextstartfrom %][% IF ( resultsperpage ) %]&resultsperpage=[% resultsperpage %][% END %]#resultnumber">Next >></a> >- [% END %] >- </div> >+ </table> >+ [% ELSE %]There are no pending orders.[% END %] > </div> > [% ELSE %] > <p> >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10044
:
17414
|
17697
|
17867
|
17868