From 39db6e82c6ed5493b758c26a58f50f0ded99722a Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Fri, 2 Sep 2011 16:30:18 +0200 Subject: [PATCH] Bug 6838: Add pagination and filtering on subscriptions table Content-Type: text/plain; charset="UTF-8" Use dataTables plugin Signed-off-by: Jared Camins-Esakov --- C4/Serials.pm | 10 +++++ .../prog/en/modules/serials/serials-home.tt | 36 ++++++++++++++----- 2 files changed, 36 insertions(+), 10 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index 9cda52e..b1ead55 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -612,6 +612,16 @@ sub GetSubscriptions { my $odd = 1; while ( my $line = $sth->fetchrow_hashref ) { + if ( $previousbiblio eq $line->{biblionumber} ) { + # Disabled for sorting and filtering on issn and title + # to work on serials-home.pl + #$line->{title} = ""; + #$line->{issn} = ""; + } else { + $previousbiblio = $line->{biblionumber}; + $odd = -$odd; + } + $line->{toggle} = 1 if $odd == 1; $line->{'cannotedit'} = ( C4::Context->preference('IndependantBranches') && C4::Context->userenv diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tt index fb310d5..bd59189 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tt @@ -1,18 +1,22 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Serials [% biblionumber %] + [% INCLUDE 'doc-head-close.inc' %] - + +[% INCLUDE 'datatables-strings.inc' %] + @@ -85,9 +89,21 @@ Serials updated : [% IF ( routing ) %] Routing list [% END %] -   +   +   + + + + + + + + + + + [% FOREACH subscription IN subscriptions %] [% UNLESS ( loop.odd ) %] -- 1.7.2.5