first commit
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
{**
|
||||
* templates/frontend/objects/announcement_full.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2021 Simon Fraser University
|
||||
* Copyright (c) 2003-2021 John Willinsky
|
||||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
|
||||
*
|
||||
* @brief Display the full view of an announcement, when the announcement is
|
||||
* the primary element on the page.
|
||||
*
|
||||
* @uses $announcement Announcement The announcement to display
|
||||
*}
|
||||
|
||||
<article class="obj_announcement_full">
|
||||
<h1>
|
||||
{$announcement->getLocalizedTitle()|escape}
|
||||
</h1>
|
||||
<div class="date">
|
||||
{$announcement->getDatePosted()|date_format:$dateFormatShort}
|
||||
</div>
|
||||
<div class="description">
|
||||
{if $announcement->getLocalizedDescription()}
|
||||
{$announcement->getLocalizedDescription()|strip_unsafe_html}
|
||||
{else}
|
||||
{$announcement->getLocalizedDescriptionShort()|strip_unsafe_html}
|
||||
{/if}
|
||||
</div>
|
||||
</article><!-- .obj_announcement_full -->
|
||||
@@ -0,0 +1,37 @@
|
||||
{**
|
||||
* templates/frontend/objects/announcement_summary.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2021 Simon Fraser University
|
||||
* Copyright (c) 2003-2021 John Willinsky
|
||||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
|
||||
*
|
||||
* @brief Display a summary view of an announcement
|
||||
*
|
||||
* @uses $announcement Announcement The announcement to display
|
||||
* @uses $heading string HTML heading element, default: h2
|
||||
*}
|
||||
{if !$heading}
|
||||
{assign var="heading" value="h2"}
|
||||
{/if}
|
||||
|
||||
<article class="obj_announcement_summary">
|
||||
<{$heading}>
|
||||
<a href="{url router=\PKP\core\PKPApplication::ROUTE_PAGE page="announcement" op="view" path=$announcement->getId()}">
|
||||
{$announcement->getLocalizedTitle()|escape}
|
||||
</a>
|
||||
</{$heading}>
|
||||
<div class="date">
|
||||
{$announcement->getDatePosted()|date_format:$dateFormatShort}
|
||||
</div>
|
||||
<div class="summary">
|
||||
{$announcement->getLocalizedDescriptionShort()|strip_unsafe_html}
|
||||
<a href="{url router=\PKP\core\PKPApplication::ROUTE_PAGE page="announcement" op="view" path=$announcement->getId()}" class="read_more">
|
||||
<span aria-hidden="true" role="presentation">
|
||||
{translate key="common.readMore"}
|
||||
</span>
|
||||
<span class="pkp_screen_reader">
|
||||
{translate key="common.readMoreWithTitle" title=$announcement->getLocalizedTitle()|escape}
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</article><!-- .obj_announcement_summary -->
|
||||
@@ -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}
|
||||
Reference in New Issue
Block a user