Skip to content

Commit

Permalink
pkp/pkp-lib#9253 Move shared announcements template into pkp-lib
Browse files Browse the repository at this point in the history
  • Loading branch information
NateWr committed Aug 25, 2023
1 parent 9a17b7a commit 511c39c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 60 deletions.
31 changes: 1 addition & 30 deletions templates/frontend/pages/indexJournal.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -37,36 +37,7 @@
</section>
{/if}

{* Announcements *}
{if $numAnnouncementsHomepage && $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 > $numAnnouncementsHomepage}
{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}
{include file="frontend/objects/announcements_list.tpl" numAnnouncements=$numAnnouncementsHomepage}

{* Latest issue *}
{if $issue}
Expand Down
31 changes: 1 addition & 30 deletions templates/frontend/pages/indexSite.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,36 +18,7 @@
</div>
{/if}

{* Announcements *}
{if $numAnnouncementsHomepage && $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 > $numAnnouncementsHomepage}
{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}
{include file="frontend/objects/announcements_list.tpl" numAnnouncements=$numAnnouncementsHomepage}

<div class="journals">
<h2>
Expand Down

0 comments on commit 511c39c

Please sign in to comment.