Bugzilla – Attachment 8023 Details for
Bug 7647
Checkout History Sort
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
0001-bug_7647-Table-sorter-on-issue-history.patch (text/plain), 3.78 KB, created by
Srdjan Jankovic
on 2012-03-06 03:00:28 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Srdjan Jankovic
Created:
2012-03-06 03:00:28 UTC
Size:
3.78 KB
patch
obsolete
>From 16cd35df641433f356a27c6d8eebc8201fe1df8e Mon Sep 17 00:00:00 2001 >From: Srdjan Jankovic <srdjan@catalyst.net.nz> >Date: Tue, 6 Mar 2012 15:55:52 +1300 >Subject: [PATCH] bug_7647: Table sorter on issue history > >--- > catalogue/issuehistory.pl | 4 +++ > .../prog/en/modules/catalogue/issuehistory.tt | 23 +++++++++++++++++++- > 2 files changed, 26 insertions(+), 1 deletions(-) > >diff --git a/catalogue/issuehistory.pl b/catalogue/issuehistory.pl >index 3fb936e..88c5c9b 100755 >--- a/catalogue/issuehistory.pl >+++ b/catalogue/issuehistory.pl >@@ -68,6 +68,10 @@ if ($itemnumber){ > ); > } > foreach (@$issues){ >+ $_->{date_due_sort} = $_->{date_due}; >+ $_->{issuedate_sort} = $_->{issuedate}; >+ $_->{returndate_sort} = $_->{returndate}; >+ $_->{lastreneweddate_sort} = $_->{lastreneweddate}; > $_->{date_due} = format_date($_->{date_due}); > $_->{issuedate} = format_date($_->{issuedate}); > $_->{returndate} = format_date($_->{returndate}); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt >index de5db0e..3b84596 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt >@@ -1,6 +1,23 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Catalog › Checkout History for [% title |html %]</title> > [% INCLUDE 'doc-head-close.inc' %] >+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script> >+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.pager.js"></script> >+<script type="text/javascript" id="js"> >+$(document).ready(function() { >+ // call the tablesorter plugin >+ $("#table_issues").tablesorter({ >+ textExtraction: function(node) { >+ var sort = node.innerHTML; >+ $(node).find(".ts_sort").each( function (idx, e) { >+ sort = e.innerHTML; >+ }); >+ return sort; >+ }, >+ sortList: [[4,1]] >+ }); //.tablesorterPager({container: $("#pagertable_issues"),positionFixed: false,size: 50}); >+}); </script> >+ > </head> > <body> > >@@ -21,7 +38,7 @@ > <div class="searchresults"> > [% IF ( issues ) %] > <h4>Checked out [% total %] times</h4> >- <table> >+ <table id="table_issues"> > <thead><tr> > <th>Patron</th> > <th>Barcode</th> >@@ -47,22 +64,26 @@ > [% END %]</td> > <td>[% IF ( issue.renewals ) %] > Yes[% IF ( issue.lastreneweddate ) %], <small>last on: [% issue.lastreneweddate %]</small> >+ <span class="ts_sort" style="display: none">[% issue.lastreneweddate_sort %]</span> > [% END %] > [% ELSE %] > No > [% END %]</td> > <td>[% IF ( issue.issuedate ) %] > [% issue.issuedate %] >+ <span class="ts_sort" style="display: none">[% issue.issuedate_sort %]</span> > [% ELSE %] > > [% END %]</td> > <td>[% IF ( issue.date_due ) %] > [% issue.date_due %] >+ <span class="ts_sort" style="display: none">[% issue.date_due_sort %]</span> > [% ELSE %] > > [% END %]</td> > <td>[% IF ( issue.returndate ) %] > [% issue.returndate %] >+ <span class="ts_sort" style="display: none">[% issue.returndate_sort %]</span> > [% ELSE %] > > [% END %]</td> >-- >1.6.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 7647
:
8023
|
8677
|
9438