[Koha-patches] [PATCH] Bug 10721 - Improve DataTables configuration on transfers to receive report
Owen Leonard
oleonard at myacpl.org
Tue Aug 13 20:57:51 CEST 2013
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' %]
<title>Koha › Circulation › Transfers to your library</title>
[% 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 %]
<tr>
[% END %]
- <td><p>[% reser.datetransfer %]</p> [% IF ( reser.messcompa ) %]<span class="error">Transfer is [% reser.diff %] days late</span>[% END %]</td>
- <td><span style="display:none;">[% reser.title |html %]</span><!-- invisible title for tablesorter -->
- [% INCLUDE 'biblio-default-view.inc' biblionumber = reser.biblionumber %][% reser.title |html %] [% IF ( reser.subtitle ) %] [% FOREACH subtitl IN reser.subtitle %][% subtitl.subfield %][% END %][% END %]</a> [% IF ( reser.author ) %]by [% reser.author %][% END %]
+ <td><p><span title="[% reser.datetransfer %]">[% reser.datetransfer | $KohaDates %]</span></p> [% IF ( reser.messcompa ) %]<span class="error">Transfer is [% reser.diff %] days late</span>[% END %]</td>
+ <td>
+ [% INCLUDE 'biblio-default-view.inc' biblionumber = reser.biblionumber %][% reser.title |html %] [% IF ( reser.subtitle ) %] [% FOREACH subtitl IN reser.subtitle %][% subtitl.subfield %][% END %][% END %]</a> [% IF ( reser.author ) %]by [% reser.author %][% END %]
[% IF ( reser.itemtype ) %] (<b>[% reser.itemtype %]</b>)[% END %]
<br />Barcode: [% reser.barcode %]
</td>
--
1.7.9.5
More information about the Koha-patches
mailing list