From 511c39cf09b524292e249c5e188ff5a17fae9a64 Mon Sep 17 00:00:00 2001 From: Nate Wright Date: Fri, 25 Aug 2023 14:20:46 +0100 Subject: [PATCH] pkp/pkp-lib#9253 Move shared announcements template into pkp-lib --- templates/frontend/pages/indexJournal.tpl | 31 +---------------------- templates/frontend/pages/indexSite.tpl | 31 +---------------------- 2 files changed, 2 insertions(+), 60 deletions(-) diff --git a/templates/frontend/pages/indexJournal.tpl b/templates/frontend/pages/indexJournal.tpl index 526f0d1d524..a6a52d23ae8 100644 --- a/templates/frontend/pages/indexJournal.tpl +++ b/templates/frontend/pages/indexJournal.tpl @@ -37,36 +37,7 @@ {/if} - {* Announcements *} - {if $numAnnouncementsHomepage && $announcements|@count} -
- -

- {translate key="announcement.announcements"} -

- {foreach name=announcements from=$announcements item=announcement} - {if $smarty.foreach.announcements.iteration > $numAnnouncementsHomepage} - {break} - {/if} - {if $smarty.foreach.announcements.iteration == 1} - {include file="frontend/objects/announcement_summary.tpl" heading="h3"} -
- {else} - - {/if} - {/foreach} -
-
- {/if} + {include file="frontend/objects/announcements_list.tpl" numAnnouncements=$numAnnouncementsHomepage} {* Latest issue *} {if $issue} diff --git a/templates/frontend/pages/indexSite.tpl b/templates/frontend/pages/indexSite.tpl index d2cbceef005..cfc525b26bc 100644 --- a/templates/frontend/pages/indexSite.tpl +++ b/templates/frontend/pages/indexSite.tpl @@ -18,36 +18,7 @@ {/if} - {* Announcements *} - {if $numAnnouncementsHomepage && $announcements|@count} -
- -

- {translate key="announcement.announcements"} -

- {foreach name=announcements from=$announcements item=announcement} - {if $smarty.foreach.announcements.iteration > $numAnnouncementsHomepage} - {break} - {/if} - {if $smarty.foreach.announcements.iteration == 1} - {include file="frontend/objects/announcement_summary.tpl" heading="h3"} -
- {else} - - {/if} - {/foreach} -
-
- {/if} + {include file="frontend/objects/announcements_list.tpl" numAnnouncements=$numAnnouncementsHomepage}