-
Notifications
You must be signed in to change notification settings - Fork 448
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#9253 Move shared announcements template into pkp-lib
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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} | ||
<section class="cmp_announcements highlight_first"> | ||
<a id="homepageAnnouncements"></a> | ||
<h2> | ||
{translate key="announcement.announcements"} | ||
</h2> | ||
{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"} | ||
<div class="more"> | ||
{else} | ||
<article class="obj_announcement_summary"> | ||
<h4> | ||
<a href="{url router=\PKP\core\PKPApplication::ROUTE_PAGE page="announcement" op="view" path=$announcement->getId()}"> | ||
{$announcement->getLocalizedTitle()|escape} | ||
</a> | ||
</h4> | ||
<div class="date"> | ||
{$announcement->getDatePosted()|date_format:$dateFormatShort} | ||
</div> | ||
</article> | ||
{/if} | ||
{/foreach} | ||
</div><!-- .more --> | ||
</section> | ||
{/if} |