Bugzilla – Attachment 26042 Details for
Bug 11719
Use new DataTables include in serials templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11719 - Use new DataTables include in serials templates
Bug-11719---Use-new-DataTables-include-in-serials-.patch (text/plain), 9.49 KB, created by
Biblibre Sandboxes
on 2014-03-11 03:48:37 UTC
(
hide
)
Description:
Bug 11719 - Use new DataTables include in serials templates
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2014-03-11 03:48:37 UTC
Size:
9.49 KB
patch
obsolete
>From 088bb39eb501e3f9d8a3107c80afb523f282598d Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 10 Feb 2014 10:22:45 -0500 >Subject: [PATCH] Bug 11719 - Use new DataTables include in serials templates > >Bug 10649 introduced a new include file for adding DataTables-related >JavaScript assets. This patch adds use of this include file to all >serials-related pages which use DataTables. > >Apply the patch and test the following pages to confirm that table >sorting works correctly: > >- Serials search results (serials/serials-search.pl): Perform a search > which will return more than one subscription. The expiration date > column is now sorted using the "title-string" filter for sorting based > on the unformatted date. The "anti-the" filter has been added to the > title column to exclude articles when sorting. > >- Serials collection (serials/serials-collection.pl): View the serial > colection page for an existing subscription. The table of issues > should be sorted correctly. > >- Serial claims (serials/claims.pl): The "since" and > "claim date" columns have been modified to use the title-string filter > for sorting based on the unformatted date. > C4::Serials.pm::GetLateOrMissingIssues has been modified to pass an > unformatted date along with the formatted date. The "anti-the" filter > has been added to the title column to exclude articles when sorting. > >Signed-off-by: Aleisha <aleishaamohia@hotmail.com> > >Signed-off-by: Aleisha <aleishaamohia@hotmail.com> >--- > C4/Serials.pm | 2 + > .../prog/en/modules/serials/claims.tt | 34 ++++++++++++++------ > .../prog/en/modules/serials/serials-collection.tt | 6 +-- > .../prog/en/modules/serials/serials-search.tt | 30 +++++++++++++----- > 4 files changed, 50 insertions(+), 22 deletions(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 2fb639b..554f244 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -2062,9 +2062,11 @@ sub GetLateOrMissingIssues { > while ( my $line = $sth->fetchrow_hashref ) { > > if ($line->{planneddate} && $line->{planneddate} !~/^0+\-/) { >+ $line->{planneddateISO} = $line->{planneddate}; > $line->{planneddate} = format_date( $line->{planneddate} ); > } > if ($line->{claimdate} && $line->{claimdate} !~/^0+\-/) { >+ $line->{claimdateISO} = $line->{claimdate}; > $line->{claimdate} = format_date( $line->{claimdate} ); > } > $line->{"status".$line->{status}} = 1; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt >index 288620b..24c8ca7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt >@@ -4,20 +4,26 @@ > <title>Koha › Serials › Claims</title> > [% INCLUDE 'doc-head-close.inc' %] > [% INCLUDE 'calendar.inc' %] >-<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/en/css/datatables.css" /> >-<script type="text/javascript" src="[% interface %]/[% theme %]/en/lib/jquery/plugins/jquery.dataTables.min.js"></script> >-[% INCLUDE 'datatables-strings.inc' %] >-<script type="text/javascript" src="[% interface %]/[% theme %]/en/js/datatables.js"></script> >+<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> >+[% INCLUDE 'datatables.inc' %] > <script type="text/javascript"> > //<![CDATA[ >- [% IF (dateformat == 'metric') %]dt_add_type_uk_date();[% END %] > $(document).ready(function() { > [% UNLESS ( preview ) %] > var sTable = $("#claimst").dataTable($.extend(true, {}, dataTablesDefaults, { > "sDom": 't', >- "aoColumnDefs": [ >- { "aTargets": [ 0,1 ], "bSortable": false, "bSearchable": false } >- ], >+ [% IF ( letter ) %] >+ "aoColumnDefs": [ >+ { "aTargets": [ 0,1 ], "bSortable": false, "bSearchable": false } >+ ], >+ [% ELSE %] >+ "aoColumnDefs": [ >+ { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false } >+ ], >+ [% END %] >+ "aoColumns": [ >+ [% IF ( letter ) %]null,[% END %]null,null,{ "sType": "anti-the" },null,null,{ "sType": "title-string" },{ "sType": "title-string" } >+ ], > "bPaginate": false > })); > [% END %] >@@ -300,10 +306,18 @@ > [% IF ( missingissue.status7 ) %]<span class="status-claimed">Claimed</span>[% END %] > </td> > <td class="planneddate"> >- [% missingissue.planneddate %] >+ [% IF ( missingissue.planneddate ) %] >+ <span title="[% missingissue.planneddateISO %]">[% missingissue.planneddate %]</span> >+ [% ELSE %] >+ <span title="0000-00-00"></span> >+ [% END %] > </td> > <td> >- [% missingissue.claimdate %] >+ [% IF ( missingissue.claimdate ) %] >+ <span title="[% missingissue.claimdateISO %]">[% missingissue.claimdate %]</span> >+ [% ELSE %] >+ <span title="0000-00-00"></span> >+ [% END %] > </td> > </tr> > [% END %]</tbody> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt >index ed1dc39..8743c18 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt >@@ -2,11 +2,9 @@ > [% USE KohaDates %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Serials › Serial collection information for [% bibliotitle %]</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.dataTables.min.js"></script> >-[% INCLUDE 'datatables-strings.inc' %] >-<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script> >+<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> >+[% INCLUDE 'datatables.inc' %] > <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> > > <script type="text/javascript"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt >index f570669..e88533b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt >@@ -3,12 +3,10 @@ > [% USE KohaDates %] > [% USE AuthorisedValues %] > <title>Koha › Serials [% biblionumber %]</title> >-<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> > [% INCLUDE 'doc-head-close.inc' %] > [% INCLUDE 'calendar.inc' %] >-<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> >+<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> >+[% INCLUDE 'datatables.inc' %] > <script type="text/javascript"> > //<![CDATA[ > $(document).ready(function() { >@@ -16,9 +14,18 @@ > dt_add_type_uk_date(); > [% END %] > var osrlt = $("#osrlt").dataTable($.extend(true, {}, dataTablesDefaults, { >- >- "aoColumnDefs": [ >- { "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false }, >+ [% IF ( routing && CAN_user_serials_routing ) %] >+ "aoColumnDefs": [ >+ { "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false }, >+ ], >+ [% ELSE %] >+ "aoColumnDefs": [ >+ { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false }, >+ ], >+ [% END %] >+ "aoColumns": [ >+ null,{ "sType": "anti-the" },null,null,null,{ "sType": "title-string" }, >+ [% IF ( routing && CAN_user_serials_routing ) %],null[% END %],null,null > ], > "sPaginationType": "four_button" > } ) ); >@@ -27,6 +34,9 @@ > "aoColumnDefs": [ > { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false }, > ], >+ "aoColumns": [ >+ null,{ "sType": "anti-the" },null,null,null,null,null,null >+ ], > "sPaginationType": "four_button" > } ) ); > >@@ -190,7 +200,11 @@ > [% IF ( subscription.callnumber ) %][% subscription.callnumber %][% END %] > </td> > <td> >- [% IF ( subscription.enddate ) %][% subscription.enddate | $KohaDates %][% END %] >+ [% IF ( subscription.enddate ) %] >+ <span title="[% subscription.enddate %]">[% subscription.enddate | $KohaDates %]</span> >+ [% ELSE %] >+ <span title="0000-00-00"></span> >+ [% END %] > </td> > [% IF ( routing && CAN_user_serials_routing ) %] > <td> >-- >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 11719
:
25178
|
25600
|
25619
|
26042
|
26043
|
27145
|
27535
|
27733
|
27734
|
27735
|
27737
|
27738
|
27739