Bugzilla – Attachment 7445 Details for
Bug 6838
Filtering and pagination in subscriptions table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6838: Add pagination and filtering on subscriptions table
0001-Bug-6838-Add-pagination-and-filtering-on-subscriptio.patch (text/plain), 3.46 KB, created by
Julian Maurice
on 2012-02-03 13:13:55 UTC
(
hide
)
Description:
Bug 6838: Add pagination and filtering on subscriptions table
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2012-02-03 13:13:55 UTC
Size:
3.46 KB
patch
obsolete
>From 2bbdd93946013716ce4a038f3c615f065c9ae5d5 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Fri, 2 Sep 2011 16:30:18 +0200 >Subject: [PATCH] Bug 6838: Add pagination and filtering on subscriptions > table > >Use dataTables plugin > >Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> >--- > C4/Serials.pm | 2 - > .../prog/en/modules/serials/serials-home.tt | 40 +++++++++++++------- > 2 files changed, 26 insertions(+), 16 deletions(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 9cda52e..e9999db 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -608,8 +608,6 @@ sub GetSubscriptions { > $sth = $dbh->prepare($sql); > $sth->execute(@bind_params); > my @results; >- my $previousbiblio = ""; >- my $odd = 1; > > while ( my $line = $sth->fetchrow_hashref ) { > $line->{'cannotedit'} = >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..ec1faf3 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' %] > <title>Koha › Serials [% biblionumber %]</title> >+<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> > [% INCLUDE 'doc-head-close.inc' %] >-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script> >+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script> >+[% INCLUDE 'datatables-strings.inc' %] >+<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script> > <script type="text/javascript"> > //<![CDATA[ > $(document).ready(function() { >- $("#srlt").tablesorter({ >- headers: { >- 2: { sorter: false }, >- 4: { sorter: false }, >- 5: { sorter: false } >- } >- }); >- }); >+ var srlt = $("#srlt").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "aoColumnDefs": [ >+ { "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false }, >+ ], >+ "sPaginationType": "four_button" >+ } ) ); >+ >+ srlt.fnAddFilters("filter", 750); >+ }); > //]]> > </script> > </head> >@@ -85,16 +89,24 @@ Serials updated : > [% IF ( routing ) %] > <th>Routing list</th> > [% END %] >- <th colspan="2"> </th> >+ <th> </th> >+ <th> </th> > </tr> > </thead> >+ <tfoot> >+ <tr> >+ <td><input type="text" class="filter" data-column_num="0" placeholder="Search ISSN" /></td> >+ <td><input type="text" class="filter" data-column_num="1" placeholder="Search title" /></td> >+ <td><input type="text" class="filter" data-column_num="2" placeholder="Search notes" /></td> >+ <td><input type="text" class="filter" data-column_num="3" placeholder="Search library" /></td> >+ <td></td> >+ <td></td> >+ <td></td> >+ </tr> >+ </tfoot> > <tbody> > [% FOREACH subscription IN subscriptions %] >- [% UNLESS ( loop.odd ) %] >- <tr class="highlight"> >- [% ELSE %] > <tr> >- [% END %] > <td> > [% IF ( subscription.issn ) %][% subscription.issn %] > [% END %] >-- >1.7.8.3 >
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 6838
:
5295
|
5342
|
6472
|
6526
|
7370
|
7445
|
7492