From 7c7e1dc41d31b869c4fdb1eb2e4afda478eef8cc Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 22 Jul 2009 16:43:42 -0500 Subject: [PATCH] bug 3436: enhance sorting of loans (self-check) [1] Change the default sort order of checked out items to have the most recent loans displayed first. [2] Add the ability (via jQuery tablesorter) for the user to sort the list of loans. Also fixed the formatting of the due date. This change was sponsored by the Plano Independent School District. Signed-off-by: Galen Charlton --- koha-tmpl/opac-tmpl/prog/en/css/sco.css | 13 +++++++++ .../prog/en/modules/sco/sco-main.tmpl | 28 +++++++++++++++++-- opac/sco/sco-main.pl | 3 ++ 3 files changed, 42 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/css/sco.css b/koha-tmpl/opac-tmpl/prog/en/css/sco.css index e31db2339e..1b1b5d5b4f 100644 --- a/koha-tmpl/opac-tmpl/prog/en/css/sco.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/sco.css @@ -165,6 +165,19 @@ tr.even td, tr.even.highlight td { background-color: #FFF; } +.header { + background-image:url("../../images/ascdesc.gif"); + background-position:right center; + background-repeat:no-repeat; + cursor:pointer; +} +.headerSortUp { + background-image:url("../../images/asc.gif"); +} +.headerSortDown { + background-image:url("../../images/desc.gif"); +} + p { margin: .7em 0; } diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tmpl index 01e4454177..132312faec 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tmpl @@ -3,6 +3,7 @@ " /> /includes/favicon.ico" type="image/x-icon" /> + @@ -135,17 +155,20 @@ Sorry, This Self-Checkout Station has lost authentication. Please contact the a
- +
Issues for ( total)
+ + + - + +
Issues for ( total)
TitleCall No.DueRenewFines
">.01.THUMBZZZ.jpg" alt="Book Cover Image" class="thumbnail" /> "> ()
@@ -161,6 +184,7 @@ Sorry, This Self-Checkout Station has lost authentication. Please contact the a
YesNo
diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl index 2a5afd0e9f..c2fc1f35bc 100755 --- a/opac/sco/sco-main.pl +++ b/opac/sco/sco-main.pl @@ -21,6 +21,7 @@ use CGI; use C4::Auth; use C4::Koha; +use C4::Dates qw/format_date/; use C4::Circulation; use C4::Reserves; use C4::Output; @@ -146,6 +147,7 @@ if ($borrower->{cardnumber}) { my @issues; my ($issueslist) = GetPendingIssues( $borrower->{'borrowernumber'} ); foreach my $it (@$issueslist) { + $it->{date_due_display} = format_date($it->{date_due}); my ($renewokay, $renewerror) = CanBookBeIssued($borrower, $it->{'barcode'},'',''); $it->{'norenew'} = 1 if $renewokay->{'NO_MORE_RENEWALS'}; push @issues, $it; @@ -164,6 +166,7 @@ if ($borrower->{cardnumber}) { $template->param( inputfocus => $inputfocus, nofines => 1, + "dateformat_" . C4::Context->preference('dateformat') => 1, ); if (C4::Context->preference('ShowPatronImageInWebBasedSelfCheck')) { my ($image, $dberror) = GetPatronImage($borrower->{cardnumber}); -- 2.39.5