Skip to content

Commit

Permalink
update announcement templates, remove deprecated submission functions
Browse files Browse the repository at this point in the history
  • Loading branch information
kaitlinnewson committed Dec 11, 2024
1 parent 8d85b35 commit 763b0d6
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 24 deletions.
14 changes: 7 additions & 7 deletions templates/frontend/objects/announcement_full.tpl
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -14,18 +14,18 @@
<article class="announcement-full">
<header class="page-header">
<h1>
{$announcement->getLocalizedTitle()|escape}
{$announcement->getLocalizedData('title')|escape}
</h1>
<small class="date">
<span class="glyphicon glyphicon-calendar"></span>
{translate key="announcement.postedOn" postDate=$announcement->getDatePosted()|escape}
{translate key="announcement.postedOn" postDate=$announcement->datePosted|escape}
</small>
</header>
<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><!-- .announcement-full" -->
12 changes: 6 additions & 6 deletions templates/frontend/objects/announcement_summary.tpl
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -12,14 +12,14 @@
<article class="announcement-summary media">
<div class="media-body">
<h2 class="media-heading">
<a href="{url router=\PKP\core\PKPApplication::ROUTE_PAGE page="announcement" op="view" path=$announcement->getId()}">
{$announcement->getLocalizedTitle()|escape}
<a href="{url router=\PKP\core\PKPApplication::ROUTE_PAGE page="announcement" op="view" path=$announcement->id}">
{$announcement->getLocalizedData('title')|escape}
</a>
</h2>
<p class="date">
<span class="glyphicon glyphicon-calendar"></span>
{$announcement->getDatePosted()|escape}
{$announcement->datePosted->format($dateFormatShort)|escape}
</p>
{$announcement->getLocalizedDescriptionShort()|strip_unsafe_html}
{$announcement->getLocalizedData('descriptionShort')|strip_unsafe_html}
</div>
</article><!-- .announcement-summary -->
10 changes: 10 additions & 0 deletions templates/frontend/objects/article_details.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
*}
<article class="article-details">

{* Indicate if this is only a preview *}
{if $publication->getData('status') !== PKP\submission\PKPSubmission::STATUS_PUBLISHED}
<div class="alert alert-warning" role="alert">
{capture assign="submissionUrl"}{url page="workflow" op="access" path=$article->getId()}{/capture}
{translate key="submission.viewingPreview" url=$submissionUrl}
</div>
{/if}
{* Notification that this is an old version *}
{if $currentPublication->getId() !== $publication->getId()}
<div class="alert alert-warning" role="alert">
Expand Down Expand Up @@ -166,6 +173,9 @@
{if $author->getLocalizedAffiliation()}
<div class="article-author-affiliation">
{$author->getLocalizedAffiliation()|escape}
{if $author->getData('rorId')}
<a href="{$author->getData('rorId')|escape}">{$rorIdIcon}</a>
{/if}
</div>
{/if}
{if $author->getOrcid()}
Expand Down
22 changes: 11 additions & 11 deletions templates/frontend/objects/article_summary.tpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{**
* templates/frontend/objects/article_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 View of an Article summary which is shown within a list of articles.
Expand All @@ -17,7 +17,7 @@
*}
{assign var=publication value=$article->getCurrentPublication()}
{assign var=articlePath value=$article->getBestId($currentJournal)}
{if (!$section.hideAuthor && $article->getHideAuthor() == \APP\submission\Submission::AUTHOR_TOC_DEFAULT) || $article->getHideAuthor() == \APP\submission\Submission::AUTHOR_TOC_SHOW}
{if (!$section.hideAuthor && $publication->getData('hideAuthor') == \APP\submission\Submission::AUTHOR_TOC_DEFAULT) || $publication->getData('hideAuthor') == \APP\submission\Submission::AUTHOR_TOC_SHOW}
{assign var="showAuthor" value=true}
{/if}

Expand All @@ -34,31 +34,31 @@
<div class="media-body">
<h3 class="media-heading">
<a href="{if $journal}{url journal=$journal->getPath() page="article" op="view" path=$articlePath}{else}{url page="article" op="view" path=$articlePath}{/if}">
{$article->getLocalizedTitle()|strip_unsafe_html}
{if $article->getLocalizedSubtitle()}
{$publication->getLocalizedTitle()|strip_unsafe_html}
{if $publication->getLocalizedSubtitle()}
<p>
<small>{$article->getLocalizedSubtitle()|escape}</small>
<small>{$publication->getLocalizedSubtitle()|escape}</small>
</p>
{/if}
</a>
</h3>

{if $showAuthor || $article->getPages()}
{if $showAuthor || $publication->getData('pages')}

{if $showAuthor}
<div class="meta">
{if $showAuthor}
<div class="authors">
{$article->getCurrentPublication()->getAuthorString($authorUserGroups)|escape}
{$publication->getAuthorString($authorUserGroups)|escape}
</div>
{/if}
</div>
{/if}

{* Page numbers for this article *}
{if $article->getPages()}
{if $publication->getData('pages')}
<p class="pages">
{$article->getPages()|escape}
{$publication->getData('pages')|escape}
</p>
{/if}

Expand All @@ -69,7 +69,7 @@
{foreach from=$article->getGalleys() item=galley}
{if $primaryGenreIds}
{assign var="file" value=$galley->getFile()}
{if !$galley->getRemoteUrl() && !($file && in_array($file->getGenreId(), $primaryGenreIds))}
{if !$galley->getData('urlRemote') && !($file && in_array($file->getGenreId(), $primaryGenreIds))}
{continue}
{/if}
{/if}
Expand Down

0 comments on commit 763b0d6

Please sign in to comment.