Bugzilla – Attachment 42837 Details for
Bug 14879
Remove C4::Dates from catalogue/detail.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14879: Move the date displays to the template
Bug-14879-Move-the-date-displays-to-the-template.patch (text/plain), 4.35 KB, created by
Jonathan Druart
on 2015-09-24 10:31:51 UTC
(
hide
)
Description:
Bug 14879: Move the date displays to the template
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-09-24 10:31:51 UTC
Size:
4.35 KB
patch
obsolete
>From 6de8639023f33de06bddfe95ef48ee26010d4f91 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 24 Sep 2015 11:28:42 +0100 >Subject: [PATCH] Bug 14879: Move the date displays to the template > >There is no special need to format the date in the perl script. > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > catalogue/detail.pl | 7 ++----- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 6 +++--- > 2 files changed, 5 insertions(+), 8 deletions(-) > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index b826f49..30ce2c2 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -205,9 +205,6 @@ foreach my $item (@items) { > $item->{imageurl} = defined $item->{itype} ? getitemtypeimagelocation('intranet', $itemtypes->{ $item->{itype} }{imageurl}) > : ''; > >- foreach (qw(datelastseen onloan)) { >- $item->{$_} = output_pref({ dt => dt_from_string( $item->{$_} ), dateonly => 1 }); >- } > $item->{datedue} = format_sqldatetime($item->{datedue}); > # item damaged, lost, withdrawn loops > $item->{itemlostloop} = GetAuthorisedValues($authvalcode_items_itemlost, $item->{itemlost}) if $authvalcode_items_itemlost; >@@ -236,7 +233,7 @@ foreach my $item (@items) { > > if ( defined $reservedate ) { > $item->{backgroundcolor} = 'reserved'; >- $item->{reservedate} = output_pref({ dt => dt_from_string($reservedate ), dateonly => 1 }); >+ $item->{reservedate} = $reservedate; > $item->{ReservedForBorrowernumber} = $reservedfor; > $item->{ReservedForSurname} = $ItemBorrowerReserveInfo->{'surname'}; > $item->{ReservedForFirstname} = $ItemBorrowerReserveInfo->{'firstname'}; >@@ -250,7 +247,7 @@ foreach my $item (@items) { > # Check the transit status > my ( $transfertwhen, $transfertfrom, $transfertto ) = GetTransfers($item->{itemnumber}); > if ( defined( $transfertwhen ) && ( $transfertwhen ne '' ) ) { >- $item->{transfertwhen} = output_pref({ dt => dt_from_string($transfertwhen ), dateonly => 1 }); >+ $item->{transfertwhen} = $transfertwhen; > $item->{transfertfrom} = $branches->{$transfertfrom}{branchname}; > $item->{transfertto} = $branches->{$transfertto}{branchname}; > $item->{nocancel} = 1; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 73a97a9..9332d63 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -652,7 +652,7 @@ function verify_images() { > : due [% item.datedue %] > </span> > [% ELSIF ( item.transfertwhen ) %] >- <span class="intransit">In transit from [% item.transfertfrom %] to [% item.transfertto %] since [% item.transfertwhen %]</span> >+ <span class="intransit">In transit from [% item.transfertfrom %] to [% item.transfertto %] since [% item.transfertwhen | $KohaDates %]</span> > [% END %] > > [% IF ( item.itemlost ) %] >@@ -713,7 +713,7 @@ function verify_images() { > since [% item.waitingdate | $KohaDates %] > [% ELSE %] > [% IF ( item.reservedate ) %] >- (placed [% item.reservedate %]) >+ (placed [% item.reservedate | $KohaDates %]) > [% END %] > [% END %] > [% END %] >@@ -735,7 +735,7 @@ function verify_images() { > [% END %] > > </td> >- <td class="datelastseen">[% item.datelastseen %]</td> >+ <td class="datelastseen">[% item.datelastseen | $KohaDates %]</td> > <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?type=[% item.type %]&itemnumber=[% item.itemnumber %]&biblionumber=[% item.biblionumber %]&bi=[% item.biblioitemnumber %]#item[% item.itemnumber %]">[% item.barcode %]</a></td> > [% IF ( volinfo ) %] > <td class="enumchron"> >-- >2.1.0
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 14879
:
42797
|
42798
|
42809
|
42810
|
42836
| 42837