Bug 7743: Update opac-user.pl to use KohaDates TT plugin
Signed-off-by: Marijana Glavica <mglavica@ffzg.hr> fixed conflict
This commit is contained in:
parent
721096cd8c
commit
80e02f01f5
|
|
@ -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 %]
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue