From 492af6ce72dcefd09b6c80e225a5bc8da4b832eb Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 13 Aug 2013 14:50:06 -0400 Subject: [PATCH] Bug 10721 - Improve DataTables configuration on transfers to receive report I noticed this template used a hidden span to allow correct sorting of titles--a relic of the previous table sorting plugin. I have removed that and added an improved DataTables configuration. To test apply the patch and view the transfers to receive report for a library which has multiple transfers to receive. Sorting should work correctly on all columns, including correct date sorting regardless of dateformat system preference. Title sorting should correctly exclude articles. Signed-off-by: David Cook Signed-off-by: Katrin Fischer Passes all tests and works nicely. Tested with different date formats. Signed-off-by: Galen Charlton (cherry picked from commit 8c3d3eb01a91c073aa9a5f2cb016bba01f0529ab) Signed-off-by: Tomas Cohen Arazi --- circ/transferstoreceive.pl | 2 +- .../prog/en/modules/circ/transferstoreceive.tt | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/circ/transferstoreceive.pl b/circ/transferstoreceive.pl index a037726059..224df5825e 100755 --- a/circ/transferstoreceive.pl +++ b/circ/transferstoreceive.pl @@ -89,7 +89,7 @@ foreach my $br ( keys %$branches ) { my $gettitle = GetBiblioFromItemNumber( $num->{'itemnumber'} ); my $itemtypeinfo = getitemtypeinfo( (C4::Context->preference('item-level_itypes')) ? $gettitle->{'itype'} : $gettitle->{'itemtype'} ); - $getransf{'datetransfer'} = format_date( $num->{'datesent'} ); + $getransf{'datetransfer'} = $num->{'datesent'}; $getransf{'itemtype'} = $itemtypeinfo ->{'description'}; foreach (qw(title author biblionumber itemnumber barcode homebranch holdingbranch itemcallnumber)) { $getransf{$_} = $gettitle->{$_}; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt index a335f983e5..d0286ca71f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt @@ -1,3 +1,4 @@ +[% USE KohaDates %] [% INCLUDE 'doc-head-open.inc' %] Koha › Circulation › Transfers to your library [% INCLUDE 'doc-head-close.inc' %] @@ -16,6 +17,9 @@ $(document).ready(function() { "aoColumnDefs": [ { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, ], + "aoColumns": [ + { "sType": "title-string" },{ "sType": "anti-the" },null,null,null,null + ], "sDom": 't', "bPaginate": false })); @@ -59,9 +63,9 @@ $(document).ready(function() { [% ELSE %] [% END %] -

[% reser.datetransfer %]

[% IF ( reser.messcompa ) %]Transfer is [% reser.diff %] days late[% END %] - [% reser.title |html %] - [% INCLUDE 'biblio-default-view.inc' biblionumber = reser.biblionumber %][% reser.title |html %] [% IF ( reser.subtitle ) %] [% FOREACH subtitl IN reser.subtitle %][% subtitl.subfield %][% END %][% END %] [% IF ( reser.author ) %]by [% reser.author %][% END %] +

[% reser.datetransfer | $KohaDates %]

[% IF ( reser.messcompa ) %]Transfer is [% reser.diff %] days late[% END %] + + [% INCLUDE 'biblio-default-view.inc' biblionumber = reser.biblionumber %][% reser.title |html %] [% IF ( reser.subtitle ) %] [% FOREACH subtitl IN reser.subtitle %][% subtitl.subfield %][% END %][% END %] [% IF ( reser.author ) %]by [% reser.author %][% END %] [% IF ( reser.itemtype ) %]  ([% reser.itemtype %])[% END %]
Barcode: [% reser.barcode %] -- 2.39.5