From 379e94e1aee94fb3d697885759fd17fb59104e99 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Tue, 24 Jan 2017 03:31:59 +0000 Subject: [PATCH] Bug 14272: [FOLLOW-UP] Show single news item This patch fixes merge conflicts, an error in the query, and changes the column name `new` to `content`. This patch is now ready to test. Sponsored-by: Catalyst IT --- C4/NewsChannels.pm | 4 ++-- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/NewsChannels.pm b/C4/NewsChannels.pm index 5228804..d9463c7 100644 --- a/C4/NewsChannels.pm +++ b/C4/NewsChannels.pm @@ -207,7 +207,7 @@ sub GetNewsToDisplay { FROM opac_news LEFT JOIN borrowers on borrowers.borrowernumber = opac_news.borrowernumber - WHERE (}; + WHERE }; if ( defined $id ) { $query .= q{ opac_news.idnew = ? } if defined $id; @@ -216,7 +216,7 @@ sub GetNewsToDisplay { unless ( defined $time ) { $query .= q{ AND } if defined $id; - $query .= q{ + $query .= q{ ( expirationdate >= CURRENT_DATE() OR expirationdate IS NULL OR expirationdate = '00-00-0000' diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt index 8251c98..87cad6e 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt @@ -68,7 +68,7 @@ [% FOREACH koha_new IN koha_news %]

[% koha_new.title %]

-
[% koha_new.new %]
+
[% koha_new.content %]
(published on [% koha_new.newdate %][% IF ( (newsdisp == 'opac' || newsdisp == 'both') && koha_new.borrowernumber ) %] by [% koha_new.author_title %] [% koha_new.author_firstname %] [% koha_new.author_surname %][% END %])
[% END %] -- 2.1.4