From 8555749fd60010a3bc0091df2c2eef3497e204be Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Mon, 19 Mar 2012 15:05:24 +0100 Subject: [PATCH] Bug 7743: Update opac-showreviews.pl to use KohaDates TT plugin Signed-off-by: Marijana Glavica --- koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews-rss.tt | 4 +++- koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews.tt | 4 +++- opac/opac-showreviews.pl | 5 +---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews-rss.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews-rss.tt index 42e0fc073c..7e9cc2454d 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews-rss.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews-rss.tt @@ -1,3 +1,5 @@ +[% USE KohaDates %] + @@ -26,7 +28,7 @@ [% IF ( review.notes ) %], [% review.notes |html %][% END %] [% IF ( review.size ) %] [% review.size |html %]. [% END %] [% IF ( review.isbn ) %] [% review.isbn |html %][% END %]

-

[% IF ( review.borrowernumber && ShowReviewer ) %][% review.firstname %] [% review.surname %] commented[% ELSE %]Comment[% END %] on [% review.datereviewed %]: [% review.review |html %]

+

[% IF ( review.borrowernumber && ShowReviewer ) %][% review.firstname %] [% review.surname %] commented[% ELSE %]Comment[% END %] on [% review.datereviewed | $KohaDates %]: [% review.review |html %]

]]> [% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% review.biblionumber %]&reviewid=[% review.reviewid %] [% review.timestamp %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews.tt index d096ea6f4e..c132d15a68 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews.tt @@ -1,3 +1,5 @@ +[% USE KohaDates %] + [% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog › Recent Comments [% INCLUDE 'doc-head-close.inc' %] @@ -53,7 +55,7 @@ $(document).ready(function(){ [% FILTER html_break %] [% review.review |html %] [% END %] - Added [% review.datereviewed %] [% IF ( review.your_comment ) %] by you[% ELSE %] + Added [% review.datereviewed | $KohaDates %] [% IF ( review.your_comment ) %] by you[% ELSE %] [% IF ( review.borrowernumber && ShowReviewer != "none" ) %] by [% SWITCH ShowReviewer %] [% CASE 'full' %] diff --git a/opac/opac-showreviews.pl b/opac/opac-showreviews.pl index 449ffcdc4a..f8fc619f37 100755 --- a/opac/opac-showreviews.pl +++ b/opac/opac-showreviews.pl @@ -28,7 +28,7 @@ use C4::Output; use C4::Circulation; use C4::Review; use C4::Biblio; -use C4::Dates qw/format_date/; +use C4::Dates; use C4::Members qw/GetMemberDetails/; use POSIX qw(ceil strftime); @@ -117,9 +117,6 @@ for my $result (@$reviews){ my $rsstimestamp = C4::Dates->new($result->{datereviewed},"iso"); my $rsstimestamp_output = $rsstimestamp->output("rfc822"); $result->{timestamp} = $rsstimestamp_output; - $result->{datereviewed} = format_date($result->{datereviewed}); - } else { - $result->{datereviewed} = format_date($result->{datereviewed}); } } ## Build the page numbers on the bottom of the page -- 2.39.5