From 39e18457d441d8cc10aad9b3bc3b56816d586d2c Mon Sep 17 00:00:00 2001 From: Owen Leonard 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 Signed-off-by: Aleisha --- 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 7aa758f..a10c78d 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -2056,9 +2056,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 407482a..df18395 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 @@ Koha › Serials › Claims [% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'calendar.inc' %] - - -[% INCLUDE 'datatables-strings.inc' %] - + +[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'datatables-strings.inc' %] - + +[% INCLUDE 'datatables.inc' %] -[% INCLUDE 'datatables-strings.inc' %] - + +[% INCLUDE 'datatables.inc' %]