Bugzilla – Attachment 8284 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]
Update opac-detail.pl to use KohaDates TT plugin
0004-Bug-7743-Update-opac-detail.pl-to-use-KohaDates-TT-p.patch (text/plain), 7.39 KB, created by
Julian Maurice
on 2012-03-19 14:47:54 UTC
(
hide
)
Description:
Update opac-detail.pl to use KohaDates TT plugin
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2012-03-19 14:47:54 UTC
Size:
7.39 KB
patch
obsolete
>From 687e103a3ecbe42e4db436b5b2c5fb613daca7fa Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Mon, 19 Mar 2012 14:43:47 +0100 >Subject: [PATCH 4/8] Bug 7743: Update opac-detail.pl to use KohaDates TT > plugin > >--- > koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 14 ++++++++------ > opac/opac-detail.pl | 13 +++---------- > 2 files changed, 11 insertions(+), 16 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >index 7af60a0..97c0745 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >@@ -1,3 +1,5 @@ >+[% USE KohaDates %] >+ > [% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog › Details for: [% title |html %][% FOREACH subtitl IN subtitle %], [% subtitl.subfield |html %][% END %] > [% INCLUDE 'doc-head-close.inc' %] > <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script> >@@ -600,7 +602,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > [% IF ( itemdata_copynumber ) %]<td>[% ITEM_RESULT.copynumber %]</td>[% END %] > <td>[% INCLUDE 'item-status.inc' item = ITEM_RESULT %]</td> > [% IF ( itemdata_itemnotes ) %]<td>[% ITEM_RESULT.itemnotes %]</td>[% END %] >- <td>[% ITEM_RESULT.datedue %]</td> >+ <td>[% ITEM_RESULT.datedue | $KohaDates %]</td> > </tr> > [% END %]</tbody> > </table> >@@ -782,7 +784,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > [% IF ( subscription.branchname ) %]<h3>At library: [% subscription.branchname %]</h3>[% ELSE %] > [% IF ( subscription.branchcode ) %]<h3>At branch: [% subscription.branchcode %]</h3>[% END %][% END %] > [% IF ( subscription.subscriptionnotes ) %]<p>[% subscription.subscriptionnotes %] </p>[% END %] >- <p>Subscription from: [% subscription.histstartdate %] to:[% IF ( subscription.histenddate ) %] [% subscription.histenddate %] [% ELSE %] now (current)[% END %]</p> >+ <p>Subscription from: [% subscription.histstartdate | $KohaDates %] to:[% IF ( subscription.histenddate ) %] [% subscription.histenddate | $KohaDates %] [% ELSE %] now (current)[% END %]</p> > [% IF ( subscription.missinglist ) %]<p>Missing issues: [% subscription.missinglist %] </p>[% END %] > [% IF ( subscription.opacnote ) %]<p>([% subscription.opacnote %])</p>[% END %] > [% IF ( subscription.latestserials ) %] >@@ -864,7 +866,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > <h5> > Your Comment > </h5> >- <small>[% review.datereviewed %]</small> >+ <small>[% review.datereviewed | $KohaDates %]</small> > <p> > [% FILTER html_break %] > [% review.review |html %] >@@ -889,9 +891,9 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > [% CASE 'username' %] > <h5>Comment by [% review.userid %]</h5> > [% END %] >- <small>[% review.datereviewed %]</small> >+ <small>[% review.datereviewed | $KohaDates %]</small> > [% ELSIF ( ShowReviewer == "none") %] >- <h5>Patron comment on [% review.datereviewed %]</h5> >+ <h5>Patron comment on [% review.datereviewed | $KohaDates %]</h5> > [% END %] > <p> > [% FILTER html_break %] >@@ -980,7 +982,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > > [% FOREACH AMAZON_CUSTOMER_REVIEW IN AMAZON_CUSTOMER_REVIEWS %] > <div class="content_set"> >- <div class="clearfix" style="margin: .5em 0;"><h4 style="float: left;">[% AMAZON_CUSTOMER_REVIEW.Summary |html %]</h4> <span class="starMT" style="float: left;"><span class="starFull" style="float: left; width:[% Rating * 10 %]px"></span></span> </div> [% AMAZON_CUSTOMER_REVIEW.Date %] >+ <div class="clearfix" style="margin: .5em 0;"><h4 style="float: left;">[% AMAZON_CUSTOMER_REVIEW.Summary |html %]</h4> <span class="starMT" style="float: left;"><span class="starFull" style="float: left; width:[% Rating * 10 %]px"></span></span> </div> [% AMAZON_CUSTOMER_REVIEW.Date | $KohaDates %] > [% IF ( AMAZON_CUSTOMER_REVIEW.Content ) %] > <p style="margin-left: .2em;">[% AMAZON_CUSTOMER_REVIEW.Content |html %]</p> > [% END %] >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index 27684d4..f3f7d42 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -32,7 +32,6 @@ use C4::Biblio; > use C4::Items; > use C4::Circulation; > use C4::Tags qw(get_tags); >-use C4::Dates qw/format_date/; > use C4::XISBN qw(get_xisbns get_biblionumber_from_isbn); > use C4::External::Amazon; > use C4::External::Syndetics qw(get_syndetics_index get_syndetics_summary get_syndetics_toc get_syndetics_excerpt get_syndetics_reviews get_syndetics_anotes ); >@@ -453,8 +452,8 @@ foreach my $subscription (@subscriptions) { > $cell{subscriptionnotes} = $subscription->{notes}; > $cell{missinglist} = $subscription->{missinglist}; > $cell{opacnote} = $subscription->{opacnote}; >- $cell{histstartdate} = format_date($subscription->{histstartdate}); >- $cell{histenddate} = format_date($subscription->{histenddate}); >+ $cell{histstartdate} = $subscription->{histstartdate}; >+ $cell{histenddate} = $subscription->{histenddate}; > $cell{branchcode} = $subscription->{branchcode}; > $cell{branchname} = GetBranchName($subscription->{branchcode}); > $cell{hasalert} = $subscription->{hasalert}; >@@ -494,8 +493,6 @@ for my $itm (@items) { > # I can't actually find any case in which this is defined. --amoore 2008-12-09 > $itm->{ $itm->{'publictype'} } = 1; > } >- $itm->{datedue} = format_date($itm->{datedue}); >- $itm->{datelastseen} = format_date($itm->{datelastseen}); > > # get collection code description, too > if ( my $ccode = $itm->{'ccode'} ) { >@@ -527,7 +524,7 @@ for my $itm (@items) { > > my ( $transfertwhen, $transfertfrom, $transfertto ) = GetTransfers($itm->{itemnumber}); > if ( defined( $transfertwhen ) && $transfertwhen ne '' ) { >- $itm->{transfertwhen} = format_date($transfertwhen); >+ $itm->{transfertwhen} = $transfertwhen; > $itm->{transfertfrom} = $branches->{$transfertfrom}{branchname}; > $itm->{transfertto} = $branches->{$transfertto}{branchname}; > } >@@ -641,7 +638,6 @@ foreach ( @$reviews ) { > } > $_->{userid} = $borrowerData->{'userid'}; > $_->{cardnumber} = $borrowerData->{'cardnumber'}; >- $_->{datereviewed} = format_date($_->{datereviewed}); > if ($borrowerData->{'borrowernumber'} eq $borrowernumber) { > $_->{your_comment} = 1; > $loggedincommenter = 1; >@@ -723,9 +719,6 @@ if ( C4::Context->preference("OPACAmazonEnabled") ) { > if ( $amazon_reviews ) { > my $item = $amazon_details->{Items}->{Item}->[0]; > my $customer_reviews = \@{ $item->{CustomerReviews}->{Review} }; >- for my $one_review ( @$customer_reviews ) { >- $one_review->{Date} = format_date($one_review->{Date}); >- } > my $editorial_reviews = \@{ $item->{EditorialReviews}->{EditorialReview} }; > my $average_rating = $item->{CustomerReviews}->{AverageRating} || 0; > $template->param( amazon_average_rating => $average_rating * 20); >-- >1.7.9.1 >
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