Bugzilla – Attachment 7370 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
Bug-6838-Add-pagination-and-filtering-on-subscript.patch (text/plain), 3.67 KB, created by
Jared Camins-Esakov
on 2012-01-28 15:16:35 UTC
(
hide
)
Description:
Bug 6838: Add pagination and filtering on subscriptions table
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2012-01-28 15:16:35 UTC
Size:
3.67 KB
patch
obsolete
>From 39db6e82c6ed5493b758c26a58f50f0ded99722a 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 >Content-Type: text/plain; charset="UTF-8" > >Use dataTables plugin > >Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> >--- > 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' %] > <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": "full_numbers" >+ } ) ); >+ >+ srlt.fnAddFilters("filter", 750); >+ }); > //]]> > </script> > </head> >@@ -85,9 +89,21 @@ 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 ) %] >-- >1.7.2.5
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