Bugzilla – Attachment 8575 Details for
Bug 7743
Use KohaDates TT plugin in OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 7743: Update opac-user.pl to use KohaDates TT plugin
SIGNED-OFF-Bug-7743-Update-opac-userpl-to-use-Koha.patch (text/plain), 9.33 KB, created by
Marijana Glavica
on 2012-03-23 10:43:36 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 7743: Update opac-user.pl to use KohaDates TT plugin
Filename:
MIME Type:
Creator:
Marijana Glavica
Created:
2012-03-23 10:43:36 UTC
Size:
9.33 KB
patch
obsolete
>From eff2250a11b485bd1a4eb9da12e22eaaedbd1878 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Mon, 19 Mar 2012 14:28:03 +0100 >Subject: [PATCH] [SIGNED-OFF] Bug 7743: Update opac-user.pl to use KohaDates TT plugin > >Signed-off-by: Marijana Glavica <mglavica@ffzg.hr> > >fixed conflict >--- > koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 22 ++++++++++++---------- > opac/opac-user.pl | 14 +++----------- > 2 files changed, 15 insertions(+), 21 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt >index 8fc13d9..79556e2 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt >@@ -1,3 +1,5 @@ >+[% USE KohaDates %] >+ > [% INCLUDE 'doc-head-open.inc' %] > [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog › Your library home > [% INCLUDE 'doc-head-close.inc' %] >@@ -62,7 +64,7 @@ $.tablesorter.addParser({ > [% FOREACH bor_messages_loo IN bor_messages_loop %] > <li> > <strong>[% bor_messages_loo.message %]</strong><br> >- <i>Written on [% bor_messages_loo.message_date_formatted %] by [% bor_messages_loo.branchname %]</i> >+ <i>Written on [% bor_messages_loo.message_date | $KohaDates %] by [% bor_messages_loo.branchname %]</i> > </li> > [% END %] > >@@ -89,7 +91,7 @@ $.tablesorter.addParser({ > <div class="dialog alert"> > <ul> > [% IF ( userdebarred ) %] >- <li><strong>Please note:</strong> Your account has been frozen[% IF ( BORROWER_INF.userdebarreddate ) %] until [% BORROWER_INF.userdebarreddate %][% END %][% IF ( BORROWER_INF.debarredcomment ) %] with the comment "[% BORROWER_INF.debarredcomment %]"[% END %]. Usually the reason for freezing an account is old overdues or damage fees. If <a href="/cgi-bin/koha/opac-user.pl">your account page</a> shows your account to be clear, please contact the library.</li> >+ <li><strong>Please note:</strong> Your account has been frozen[% IF ( BORROWER_INF.userdebarreddate ) %] until [% BORROWER_INF.userdebarreddate | $KohaDates %][% END %][% IF ( BORROWER_INF.debarredcomment ) %] with the comment "[% BORROWER_INF.debarredcomment %]"[% END %]. Usually the reason for freezing an account is old overdues or damage fees. If <a href="/cgi-bin/koha/opac-user.pl">your account page</a> shows your account to be clear, please contact the library.</li> > [% END %] > [% IF ( BORROWER_INF.gonenoaddress ) %] > <li><strong>Please note:</strong> According to our records, we don't have up-to-date [% UNLESS ( BORROWER_INF.OPACPatronDetails ) %]<a href="/cgi-bin/koha/opac-userupdate.pl">contact information</a>[% ELSE %]contact information[% END %] on file. Please contact the library[% IF ( BORROWER_INF.OPACPatronDetails ) %] or use the <a href="/cgi-bin/koha/opac-userupdate.pl">online update form</a> to submit current information (<em>Please note:</em> there may be a delay in restoring your account if you submit online)[% END %].</li> >@@ -169,7 +171,7 @@ $.tablesorter.addParser({ > </a><span class="item-details"> > [% WAITIN.author %] > </span></td> >- <td>[% WAITIN.reservedate %]</td> >+ <td>[% WAITIN.reservedate | $KohaDates %]</td> > <td>[% IF ( WAITIN.atdestination ) %]<strong>Waiting</strong> at [% WAITIN.branch %] > [% ELSE %] > In transit from [% WAITIN.holdingbranch %] to [% WAITIN.branch %] >@@ -234,9 +236,9 @@ $.tablesorter.addParser({ > [% ISSUE.author %] > </span></td> > [% IF ( ISSUE.overdue ) %] >- <td class="overdue">[% ISSUE.date_due %]</td> >+ <td class="overdue">[% ISSUE.date_due | $KohaDates %]</td> > [% ELSE %] >- <td>[% ISSUE.date_due %]</td> >+ <td>[% ISSUE.date_due | $KohaDates %]</td> > [% END %] > [% UNLESS ( item_level_itypes ) %]<td>[% IF ( ISSUE.imageurl ) %]<img src="[% ISSUE.imageurl %]" title="[% ISSUE.description %]" alt="[% ISSUE.description %]" />[% END %] [% ISSUE.description %]</td>[% END %] > [% IF ( show_barcode ) %]<td>[% ISSUE.barcode %]</td>[% END %] >@@ -320,7 +322,7 @@ $.tablesorter.addParser({ > [% UNLESS ( item_level_itypes ) %]<td>[% IF ( OVERDUE.imageurl ) %]<img src="[% OVERDUE.imageurl %]" title="[% OVERDUE.description %]" alt="[% OVERDUE.description %]" />[% END %] [% OVERDUE.description %]</td>[% END %] > [% IF ( show_barcode ) %]<td>[% OVERDUE.barcode %]</td>[% END %] > <td>[% OVERDUE.itemcallnumber %]</td> >-<td>[% OVERDUE.date_due %]</td> >+<td>[% OVERDUE.date_due | $KohaDates %]</td> > [% IF ( OpacRenewalAllowed ) %] > <td> > [% IF ( OVERDUE.debarred ) %]Account Frozen >@@ -373,8 +375,8 @@ $.tablesorter.addParser({ > <td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RESERVE.biblionumber %]">[% RESERVE.reserves_title %]</a> > [% RESERVE.author %] > </td> >- <td>[% RESERVE.reservedate %]</td> >- <td>[% IF ( RESERVE.expirationdate ) %][% RESERVE.expirationdate %][% ELSE %]Never Expires[% END %]</td> >+ <td>[% RESERVE.reservedate | $KohaDates %]</td> >+ <td>[% IF ( RESERVE.expirationdate ) %][% RESERVE.expirationdate | $KohaDates %][% ELSE %]Never Expires[% END %]</td> > <td>[% RESERVE.branch %]</td> > [% IF ( showpriority ) %] > <td>[% RESERVE.priority %] </td> >@@ -383,7 +385,7 @@ $.tablesorter.addParser({ > [% IF ( RESERVE.wait ) %] > [% IF ( RESERVE.atdestination ) %] > [% IF ( RESERVE.found ) %] >- Item waiting at <b> [% RESERVE.wbrname %]</b>[% IF ( RESERVE.formattedwaitingdate ) %] since [% RESERVE.formattedwaitingdate %][% END %] >+ Item waiting at <b> [% RESERVE.wbrname %]</b>[% IF ( RESERVE.formattedwaitingdate ) %] since [% RESERVE.waitingdate | $KohaDates %][% END %] > <input type="hidden" name="pickup" value="[% RESERVE.wbrcd %]" /> > [% ELSE %] > Item waiting to be pulled from <b> [% RESERVE.wbrname %]</b> >@@ -394,7 +396,7 @@ $.tablesorter.addParser({ > [% ELSE %] > [% IF ( RESERVE.intransit ) %] > Item in transit from <b> [% RESERVE.frombranch %]</b> since >- [% RESERVE.datesent %] >+ [% RESERVE.datesent | $KohaDates %] > [% ELSE %] > Pending > [% END %] >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index 655f812..78b155c 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -33,7 +33,6 @@ use C4::Output; > use C4::Overdues qw/CheckBorrowerDebarred/; > use C4::Biblio; > use C4::Items; >-use C4::Dates qw/format_date/; > use C4::Letters; > use C4::Branch; # GetBranches > use Koha::DateUtils; >@@ -76,9 +75,6 @@ my ( $borr ) = GetMemberDetails( $borrowernumber ); > my ( $today_year, $today_month, $today_day) = Today(); > my ($warning_year, $warning_month, $warning_day) = split /-/, $borr->{'dateexpiry'}; > >-for (qw(dateenrolled dateexpiry dateofbirth)) { >- ($borr->{$_}) and $borr->{$_} = format_date($borr->{$_}); >-} > $borr->{'ethnicity'} = fixEthnicity( $borr->{'ethnicity'} ); > > my $debar = CheckBorrowerDebarred($borrowernumber); >@@ -88,7 +84,7 @@ if ($debar) { > $userdebarred = 1; > $template->param( 'userdebarred' => $userdebarred ); > if ( $debar ne "9999-12-31" ) { >- $borr->{'userdebarreddate'} = C4::Dates::format_date($debar); >+ $borr->{'userdebarreddate'} = $debar; > } > } > >@@ -254,18 +250,14 @@ $template->param( branchloop => \@branch_loop ); > # now the reserved items.... > my @reserves = GetReservesFromBorrowernumber( $borrowernumber ); > foreach my $res (@reserves) { >- $res->{'reservedate'} = format_date( $res->{'reservedate'} ); > >- if ( $res->{'expirationdate'} ne '0000-00-00' ) { >- $res->{'expirationdate'} = format_date( $res->{'expirationdate'} ) >- } else { >+ if ( $res->{'expirationdate'} eq '0000-00-00' ) { > $res->{'expirationdate'} = ''; > } > > my $publictype = $res->{'publictype'}; > $res->{$publictype} = 1; > $res->{'waiting'} = 1 if $res->{'found'} eq 'W'; >- $res->{'formattedwaitingdate'} = format_date($res->{'waitingdate'}); > $res->{'branch'} = $branches->{ $res->{'branchcode'} }->{'branchname'}; > my $biblioData = GetBiblioData($res->{'biblionumber'}); > $res->{'reserves_title'} = $biblioData->{'title'}; >@@ -311,7 +303,7 @@ foreach my $res (@reserves) { > my ($transfertwhen, $transfertfrom, $transfertto) = GetTransfers( $res->{'itemnumber'} ); > if ($transfertwhen) { > $res->{intransit} = 1; >- $res->{datesent} = format_date($transfertwhen); >+ $res->{datesent} = $transfertwhen; > $res->{frombranch} = GetBranchName($transfertfrom); > } > } >-- >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 7743
:
8281
|
8282
|
8283
|
8284
|
8285
|
8286
|
8287
|
8288
|
8573
|
8574
|
8575
|
8576
|
8577
|
8578
|
8579
|
8580
|
8624
|
9038
|
9041