From 28ca4ec652c25c40b2c3f0be1f6558b14132eae6 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 Content-Type: text/plain; charset="utf-8" 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. --- 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 a037726..224df58 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 a335f98..d0286ca 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 %] -- 1.7.9.5