Bug 7743: Update opac-showreviews.pl to use KohaDates TT plugin
Signed-off-by: Marijana Glavica <mglavica@ffzg.hr>
This commit is contained in:
parent
bc3f39b702
commit
8555749fd6
|
|
@ -1,3 +1,5 @@
|
|||
[% USE KohaDates %]
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
|
|
@ -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 %] </p>
|
||||
<p>[% IF ( review.borrowernumber && ShowReviewer ) %][% review.firstname %] [% review.surname %] commented[% ELSE %]Comment[% END %] on [% review.datereviewed %]: [% review.review |html %]</p>
|
||||
<p>[% IF ( review.borrowernumber && ShowReviewer ) %][% review.firstname %] [% review.surname %] commented[% ELSE %]Comment[% END %] on [% review.datereviewed | $KohaDates %]: [% review.review |html %]</p>
|
||||
]]></description>
|
||||
<guid>[% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% review.biblionumber %]&reviewid=[% review.reviewid %]</guid>
|
||||
<pubDate>[% review.timestamp %]</pubDate>
|
||||
|
|
|
|||
|
|
@ -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' %]
|
||||
<link rel="alternate" type="application/rss+xml" title="[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog Recent Comments" href="[% OPACBaseURL %]/cgi-bin/koha/opac-showreviews.pl?format=rss" />
|
||||
|
|
@ -53,7 +55,7 @@ $(document).ready(function(){
|
|||
[% FILTER html_break %]
|
||||
[% review.review |html %]
|
||||
[% END %]
|
||||
<span style="font-size:87%;font-color:#CCC;">Added [% review.datereviewed %] [% IF ( review.your_comment ) %] by <strong>you</strong>[% ELSE %]
|
||||
<span style="font-size:87%;font-color:#CCC;">Added [% review.datereviewed | $KohaDates %] [% IF ( review.your_comment ) %] by <strong>you</strong>[% ELSE %]
|
||||
[% IF ( review.borrowernumber && ShowReviewer != "none" ) %] by
|
||||
[% SWITCH ShowReviewer %]
|
||||
[% CASE 'full' %]
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue