From 763b0d62d23510b2298c3fa9115c2eb009c999d7 Mon Sep 17 00:00:00 2001 From: Kaitlin Newson Date: Wed, 11 Dec 2024 16:56:45 -0400 Subject: [PATCH] update announcement templates, remove deprecated submission functions --- .../frontend/objects/announcement_full.tpl | 14 ++++++------ .../frontend/objects/announcement_summary.tpl | 12 +++++----- .../frontend/objects/article_details.tpl | 10 +++++++++ .../frontend/objects/article_summary.tpl | 22 +++++++++---------- 4 files changed, 34 insertions(+), 24 deletions(-) diff --git a/templates/frontend/objects/announcement_full.tpl b/templates/frontend/objects/announcement_full.tpl index c1747c1..54096c7 100644 --- a/templates/frontend/objects/announcement_full.tpl +++ b/templates/frontend/objects/announcement_full.tpl @@ -1,8 +1,8 @@ {** * templates/frontend/objects/announcement_full.tpl * - * Copyright (c) 2014-2023 Simon Fraser University - * Copyright (c) 2003-2023 John Willinsky + * Copyright (c) 2014-2024 Simon Fraser University + * Copyright (c) 2003-2024 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 @@ -14,18 +14,18 @@
- {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/objects/announcement_summary.tpl b/templates/frontend/objects/announcement_summary.tpl index 53eb12e..0607e7e 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-2023 Simon Fraser University Library - * Copyright (c) 2003-2023 John Willinsky + * Copyright (c) 2014-2024 Simon Fraser University Library + * Copyright (c) 2003-2024 John Willinsky * Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. * * @brief Display a summary view of an announcement @@ -12,14 +12,14 @@

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

- {$announcement->getDatePosted()|escape} + {$announcement->datePosted->format($dateFormatShort)|escape}

- {$announcement->getLocalizedDescriptionShort()|strip_unsafe_html} + {$announcement->getLocalizedData('descriptionShort')|strip_unsafe_html}
diff --git a/templates/frontend/objects/article_details.tpl b/templates/frontend/objects/article_details.tpl index 20ca10c..676725b 100644 --- a/templates/frontend/objects/article_details.tpl +++ b/templates/frontend/objects/article_details.tpl @@ -16,6 +16,13 @@ *}
+ {* Indicate if this is only a preview *} + {if $publication->getData('status') !== PKP\submission\PKPSubmission::STATUS_PUBLISHED} + + {/if} {* Notification that this is an old version *} {if $currentPublication->getId() !== $publication->getId()}