Bug 7743: Update sco/sco-main.pl to use KohaDates TT plugin
authorJulian Maurice <julian.maurice@biblibre.com>
Mon, 19 Mar 2012 13:49:36 +0000 (14:49 +0100)
committerPaul Poulain <paul.poulain@biblibre.com>
Mon, 26 Mar 2012 14:22:43 +0000 (16:22 +0200)
Signed-off-by: Marijana Glavica <mglavica@ffzg.hr>
koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt
opac/sco/sco-main.pl

index f7d2c4f..9f8f634 100644 (file)
@@ -1,3 +1,5 @@
+[% USE KohaDates %]
+
 [% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha [% END %] &rsaquo; Self Checkout </title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <meta name="generator" content="Koha [% Version %]" /> <!-- leave this for stats -->
@@ -210,7 +212,7 @@ Sorry, This Self-Checkout Station has lost authentication.  Please contact the a
        <td>[% UNLESS ( ISSUE.noitemlinks ) %]<a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE.biblionumber %]">[% ISSUE.title |html %]</a>[% ELSE %]<strong>[% ISSUE.title |html %]</strong>[% END %]<span class="item-details">
        [% ISSUE.author %]</span> ([% ISSUE.barcode %])</td>
        <td>[% ISSUE.itemcallnumber %]</td>
-       [% IF ( ISSUE.overdue ) %]<td class="overdue">[% ISSUE.date_due_display %]</td>[% ELSE %]<td>[% ISSUE.date_due_display %]</td>[% END %]
+       [% IF ( ISSUE.overdue ) %]<td class="overdue">[% ISSUE.date_due | $KohaDates %]</td>[% ELSE %]<td>[% ISSUE.date_due | $KohaDates %]</td>[% END %]
        <td>
     <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
     <input type="hidden" name="op" value="checkout" />
index f0ca37e..243dddd 100755 (executable)
@@ -39,12 +39,10 @@ use Digest::MD5 qw(md5_base64);
 
 use C4::Auth qw(get_template_and_user checkpw);
 use C4::Koha;
-use C4::Dates qw/format_date/;
 use C4::Circulation;
 use C4::Reserves;
 use C4::Output;
 use C4::Members;
-use C4::Dates;
 use C4::Biblio;
 use C4::Items;
 
@@ -218,7 +216,6 @@ 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'},