From 4d79bc5128cddcb78913e579d166e7d7cd833345 Mon Sep 17 00:00:00 2001 From: Kaitlin Newson Date: Fri, 3 Jan 2025 13:31:59 -0400 Subject: [PATCH] update announcement template functions --- .../frontend/objects/announcement_summary.tpl | 16 ++++++++-------- templates/frontend/pages/announcement.tpl | 16 ++++++++-------- templates/frontend/pages/indexJournal.tpl | 16 ++++++++-------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/templates/frontend/objects/announcement_summary.tpl b/templates/frontend/objects/announcement_summary.tpl index 5047311..7aca60d 100644 --- a/templates/frontend/objects/announcement_summary.tpl +++ b/templates/frontend/objects/announcement_summary.tpl @@ -1,8 +1,8 @@ {** * templates/frontend/objects/announcement_summary.tpl * - * Copyright (c) 2014-2020 Simon Fraser University - * Copyright (c) 2003-2020 John Willinsky + * Copyright (c) 2014-2025 Simon Fraser University + * Copyright (c) 2003-2025 John Willinsky * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING. * * @brief Display a summary view of an announcement @@ -15,21 +15,21 @@ {/if} <{$heading}> - getId()}"> - {$announcement->getLocalizedTitle()|escape} + id}"> + {$announcement->getLocalizedData('title')|escape}
- {$announcement->getDatePosted()|date_format:$dateFormatShort} + {$announcement->datePosted|date_format:$dateFormatShort}
- {$announcement->getLocalizedDescriptionShort()|strip_unsafe_html} + {$announcement->getLocalizedData('descriptionShort')|strip_unsafe_html}
-getId()}" class="btn btn-secondary"> +id}" class="btn btn-secondary"> - {translate key="common.readMoreWithTitle" title=$announcement->getLocalizedTitle()|escape} + {translate key="common.readMoreWithTitle" title=$announcement->getLocalizedData('title')|escape} diff --git a/templates/frontend/pages/announcement.tpl b/templates/frontend/pages/announcement.tpl index 7e6c0e0..741da19 100644 --- a/templates/frontend/pages/announcement.tpl +++ b/templates/frontend/pages/announcement.tpl @@ -1,15 +1,15 @@ {** * templates/frontend/pages/announcements.tpl * - * Copyright (c) 2014-2020 Simon Fraser University - * Copyright (c) 2003-2020 John Willinsky + * Copyright (c) 2014-2025 Simon Fraser University + * Copyright (c) 2003-2025 John Willinsky * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING. * * @brief Display the page which represents a single announcement * * @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}
@@ -19,17 +19,17 @@

- {$announcement->getLocalizedTitle()|escape} + {$announcement->getLocalizedData('title')|escape}

- {$announcement->getDatePosted()|date_format:$dateFormatShort} + {$announcement->datePosted|date_format:$dateFormatShort}

- {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}
diff --git a/templates/frontend/pages/indexJournal.tpl b/templates/frontend/pages/indexJournal.tpl index db1ddf7..7a5a5b7 100644 --- a/templates/frontend/pages/indexJournal.tpl +++ b/templates/frontend/pages/indexJournal.tpl @@ -60,14 +60,14 @@ {break} {/if} +

{$announcement->getLocalizedData('title')|escape}

+ +

{$announcement->getLocalizedData('descriptionShort')|strip_unsafe_html}

+

+ {capture assign="announcementPageUrl"}{url router=$smarty.const.ROUTE_PAGE page="announcement" op="view" path=$announcement->id}{/capture} + {translate key="common.more"} +

+ {/foreach}
{if $numAnnouncementsHomepage > 1 && $announcements|@count > 1}