From ce4596da41ebc5cad5d2745d6584b67d94c26346 Mon Sep 17 00:00:00 2001 From: Nate Wright Date: Fri, 25 Aug 2023 14:20:12 +0100 Subject: [PATCH] pkp/pkp-lib#9253 Move shared announcements template into pkp-lib --- .../frontend/objects/announcements_list.tpl | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 templates/frontend/objects/announcements_list.tpl diff --git a/templates/frontend/objects/announcements_list.tpl b/templates/frontend/objects/announcements_list.tpl new file mode 100644 index 00000000000..d17bb583af3 --- /dev/null +++ b/templates/frontend/objects/announcements_list.tpl @@ -0,0 +1,42 @@ +{** + * templates/frontend/objects/announcements_list.tpl + * + * Copyright (c) 2014-2023 Simon Fraser University + * Copyright (c) 2003-2023 John Willinsky + * Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. + * + * @brief Display a list of announcements + * + * @uses $numAnnouncements int The number of announcements to display in the list + * @uses $announcements Announcement[] The list of announcements + *} + +{if $numAnnouncements && $announcements|@count} +
+ +

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

+ {foreach name=announcements from=$announcements item=announcement} + {if $smarty.foreach.announcements.iteration > $numAnnouncements} + {break} + {/if} + {if $smarty.foreach.announcements.iteration == 1} + {include file="frontend/objects/announcement_summary.tpl" heading="h3"} +
+ {else} + + {/if} + {/foreach} +
+
+{/if} \ No newline at end of file