Bugzilla – Attachment 17405 Details for
Bug 9903
Sort by date broken on patron detail page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9903 - Sort by date broken on patron detail page
Bug-9903---Sort-by-date-broken-on-patron-detail-pa.patch (text/plain), 6.83 KB, created by
Kyle M Hall (khall)
on 2013-04-12 16:40:06 UTC
(
hide
)
Description:
Bug 9903 - Sort by date broken on patron detail page
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-04-12 16:40:06 UTC
Size:
6.83 KB
patch
obsolete
>From 3dbb26cfa4cf08ef6d243634b4021223eff83ec9 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 9 Apr 2013 08:55:45 -0400 >Subject: [PATCH] Bug 9903 - Sort by date broken on patron detail page > >When the patron detail page switched to DataTables no accommodation was >made for metric date formats in sorting. > >This patch adds sorting based on data in a span's title attribute, and >thus requires that the patch for Bug 9887 be applied. > >To test, view the detail page for a patron who has assorted checkouts, >relatives' checkouts, and holds. Sorting of date columns should be >correct with the dateformat preference set to any value. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../prog/en/modules/members/moremember.tt | 20 +++++++++++++------- > members/moremember.pl | 3 +++ > 2 files changed, 16 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >index b3eef3a..8bb96c3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -33,12 +33,15 @@ $(document).ready(function() { > "aoColumnDefs": [ > { "aTargets": [ -1,-2 ], "bSortable": false, "bSearchable": false } > ], >+ "aoColumns": [ >+ { "sType": "title-string" },null,null,{ "sType": "title-string" },null,null,null,null,null,null >+ ], > "bPaginate": false > })); > $("#relissuest").dataTable($.extend(true, {}, dataTablesDefaults, { > "sDom": 't', >- "aoColumnDefs": [ >- { "aTargets": [ 0,8 ], "bSortable": false, "bSearchable": false } >+ "aoColumns": [ >+ { "sType": "title-string" },null,null,{ "sType": "title-string" },null,null,null,null,null > ], > "bPaginate": false > })); >@@ -47,6 +50,9 @@ $(document).ready(function() { > "aoColumnDefs": [ > { "aTargets": [ -1,-2 ], "bSortable": false, "bSearchable": false } > ], >+ "aoColumns": [ >+ { "sType": "title-string" },null,null,null,null,null,null >+ ], > "bPaginate": false > })); > [% IF ( picture ) %] >@@ -468,7 +474,7 @@ function validate1(date) { > [% ELSE %] > <td> > [% END %] >- [% issueloo.date_due %] >+ <span title="[% issueloo.date_due_sort %]">[% issueloo.date_due %]</span> > [% IF ( issueloo.itemlost ) %] > <span class="lost">[% issueloo.itemlost %]</span> > [% END %] >@@ -478,7 +484,7 @@ function validate1(date) { > </td> > <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% issueloo.biblionumber %]"><strong>[% issueloo.title |html %]</strong></a>[% IF ( issueloo.author ) %], by [% issueloo.author %][% END %] [% IF ( issueloo.publishercode ) %]; [% issueloo.publishercode %] [% END %] [% IF ( issueloo.publicationyear ) %], [% issueloo.publicationyear %][% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% issueloo.biblionumber %]&itemnumber=[% issueloo.itemnumber %]#item[% issueloo.itemnumber %]">[% issueloo.barcode %]</a></td> > <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( issueloo.itemtype_image ) %]<img src="[% issueloo.itemtype_image %]" alt="" />[% END %][% END %][% issueloo.itemtype_description %]</td> >- <td>[% issueloo.issuedate %]</td> >+ <td><span title="[% issueloo.issuedate_sort %]">[% issueloo.issuedate %]</span></td> > <td>[% issueloo.issuingbranchname %]</td> > <td>[% issueloo.itemcallnumber %]</td> > <td>[% issueloo.charge %]</td> >@@ -576,7 +582,7 @@ function validate1(date) { > [% ELSE %] > <td> > [% END %] >- [% relissueloo.date_due %] >+ <span title="[% relissueloo.date_due_sort %]">[% relissueloo.date_due %]</span> > [% IF ( relissueloo.itemlost ) %] > <span class="lost">[% relissueloo.itemlost %]</span> > [% END %] >@@ -586,7 +592,7 @@ function validate1(date) { > </td> > <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% relissueloo.biblionumber %]"><strong>[% relissueloo.title |html %]</strong></a>[% IF relissueloo.author %], by [% relissueloo.author %][% END %] [% IF relissueloo.publishercode %]; [% relissueloo.publishercode %] [% END %] [% IF relissueloo.publicationyear %], [% relissueloo.publicationyear %][% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% relissueloo.biblionumber %]&itemnumber=[% relissueloo.itemnumber %]#item[% relissueloo.itemnumber %]">[% relissueloo.barcode %]</a></td> > <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( relissueloo.itemtype_image ) %]<img src="[% relissueloo.itemtype_image %]" alt="" />[% END %][% END %][% relissueloo.itemtype_description %]</td> >- <td>[% relissueloo.issuedate %]</td> >+ <td><span title="[% relissueloo.issuedate_sort %]">[% relissueloo.issuedate %]</span></td> > <td>[% relissueloo.issuingbranchname %]</td> > <td>[% relissueloo.itemcallnumber %]</td> > <td>[% relissueloo.charge %]</td> >@@ -624,7 +630,7 @@ function validate1(date) { > </tr></thead> > <tbody>[% FOREACH reservloo IN reservloop %] > <tr class="[% reservloo.color %]"> >- <td>[% reservloo.reservedate %]</td> >+ <td><span title="[% reservloo.reservedate_sort %]">[% reservloo.reservedate %]</span></td> > <td> > <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% reservloo.biblionumber %]">[% reservloo.title |html %]</a>[% IF ( reservloo.author ) %], by [% reservloo.author %][% END %] > </td> >diff --git a/members/moremember.pl b/members/moremember.pl >index df6a664..52da918 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -274,6 +274,7 @@ if ($borrowernumber) { > foreach (qw(waiting transfered nottransfered)) { > $getreserv{$_} = 0; > } >+ $getreserv{reservedate_sort} = $num_res->{'reservedate'}; > $getreserv{reservedate} = C4::Dates->new($num_res->{'reservedate'},'iso')->output('syspref'); > foreach (qw(biblionumber title author itemcallnumber )) { > $getreserv{$_} = $getiteminfo->{$_}; >@@ -447,7 +448,9 @@ sub build_issue_data { > $issuedate = $issue->{issuedate}->clone(); > } > >+ $issue->{date_due_sort} = $issue->{date_due}; > $issue->{date_due} = output_pref( $issue->{date_due} ); >+ $issue->{issuedate_sort} = $issue->{issuedate}; > $issue->{issuedate} = output_pref( $issue->{issuedate} ) if defined $issue->{issuedate}; > my $biblionumber = $issue->{biblionumber}; > $issue->{issuingbranchname} = GetBranchName($issue->{branchcode}); >-- >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 9903
:
17308
|
17405
|
17627
|
17643