Skip to content

Commit

Permalink
update announcement template functions
Browse files Browse the repository at this point in the history
  • Loading branch information
kaitlinnewson committed Dec 15, 2024
1 parent 43bcfdc commit 1ce228e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions templates/frontend/objects/announcement_summary.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,25 @@

<article>
<{$heading}>
<a href="{url router=$smarty.const.ROUTE_PAGE page="announcement" op="view" path=$announcement->getId()}">
{$announcement->getLocalizedTitle()|escape}
<a href="{url router=$smarty.const.ROUTE_PAGE page="announcement" op="view" path=$announcement->id}">
{$announcement->getLocalizedData('title')|escape}
</a>
</{$heading}>

<p class="text-muted">
{$announcement->getDatePosted()|date_format:$dateFormatShort}
{$announcement->datePosted|date_format:$dateFormatShort}
</p>

<div class="announcements__short-description">
{$announcement->getLocalizedDescriptionShort()|strip_unsafe_html}
{$announcement->getLocalizedData('descriptionShort')|strip_unsafe_html}
</div>

<a href="{url router=$smarty.const.ROUTE_PAGE page="announcement" op="view" path=$announcement->getId()}" class="btn btn-secondary">
<a href="{url router=$smarty.const.ROUTE_PAGE page="announcement" op="view" path=$announcement->id}" class="btn btn-secondary">
<span aria-hidden="true" role="presentation">
{translate key="common.readMore"}
</span>
<span class="visually-hidden">
{translate key="common.readMoreWithTitle" title=$announcement->getLocalizedTitle()|escape}
{translate key="common.readMoreWithTitle" title=$announcement->getLocalizedData('title')|escape}
</span>
</a>
</article>
12 changes: 6 additions & 6 deletions templates/frontend/pages/announcement.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @uses $announcement Announcement The announcement to display
*}
{include file="frontend/components/header.tpl" pageTitleTranslated=$announcement->getLocalizedTitle()|escape}
{include file="frontend/components/header.tpl" pageTitleTranslated=$announcement->getLocalizedData('title')|escape}

<main class="container main__content" id="immersion_content_main">
<div class="row">
Expand All @@ -19,17 +19,17 @@
<article class="obj_announcement_full">
<header class="main__header">
<h1 class="main__title">
<span>{$announcement->getLocalizedTitle()|escape}</span>
<span>{$announcement->getLocalizedData('title')|escape}</span>
</h1>
</header>
<div class="date text-muted small">
{$announcement->getDatePosted()|date_format:$dateFormatShort}
{$announcement->datePosted|date_format:$dateFormatShort}
</div>
<div class="description">
{if $announcement->getLocalizedDescription()}
{$announcement->getLocalizedDescription()|strip_unsafe_html}
{if $announcement->getLocalizedData('description')}
{$announcement->getLocalizedData('description')|strip_unsafe_html}
{else}
{$announcement->getLocalizedDescriptionShort()|strip_unsafe_html}
{$announcement->getLocalizedData('descriptionShort')|strip_unsafe_html}
{/if}
</div>
</article><!-- .obj_announcement_full -->
Expand Down

0 comments on commit 1ce228e

Please sign in to comment.