Bugzilla – Attachment 6526 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]
New patch
0004-Bug-6838-Add-pagination-and-filtering-on-subscriptio.patch (text/plain), 3.43 KB, created by
Julian Maurice
on 2011-12-02 10:01:48 UTC
(
hide
)
Description:
New patch
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2011-12-02 10:01:48 UTC
Size:
3.43 KB
patch
obsolete
>From 6f350c75c6608ace95ec410c27c808f590768885 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 4/4] Bug 6838: Add pagination and filtering on subscriptions > table > >Use dataTables plugin >--- > C4/Serials.pm | 6 ++- > .../prog/en/modules/serials/serials-home.tt | 36 ++++++++++++++----- > 2 files changed, 30 insertions(+), 12 deletions(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 18e0ce4..87b0943 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -613,8 +613,10 @@ sub GetSubscriptions { > > while ( my $line = $sth->fetchrow_hashref ) { > if ( $previousbiblio eq $line->{biblionumber} ) { >- $line->{title} = ""; >- $line->{issn} = ""; >+ # 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; >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 7753fd3..c68ac24 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.7.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