Skip to content

Commit

Permalink
Merge pull request #236 from kaitlinnewson/3.5.0-compatibility
Browse files Browse the repository at this point in the history
3.5.0 compatibility
  • Loading branch information
kaitlinnewson authored Feb 6, 2025
2 parents e448291 + 6548a0b commit e7ea0ab
Show file tree
Hide file tree
Showing 18 changed files with 461 additions and 81 deletions.
2 changes: 1 addition & 1 deletion BootstrapThreeThemePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
namespace APP\plugins\themes\bootstrap3;

use APP\core\Application;
use APP\i18n\AppLocale;
use PKP\config\Config;
use PKP\facades\Locale;
use PKP\plugins\ThemePlugin;
Expand Down Expand Up @@ -106,6 +105,7 @@ public function init() {
'label' => __('plugins.themes.bootstrap3.options.bootstrapTheme.yeti'),
],
],
'default' => 'bootstrap3',
]);

// Add usage stats display options
Expand Down
41 changes: 41 additions & 0 deletions styles/bootstrap.less
Original file line number Diff line number Diff line change
Expand Up @@ -314,3 +314,44 @@ footer[role="contentinfo"] {
-ms-word-break: break-all;
word-break: break-word;
}

// Editorial Masthead
.page_masthead {
.user_listing {
margin-top: 1em;
list-style-type: none;
padding: 0;

li {
margin-bottom: 1.5em;
}

li > span {
display: block;
}

.name {
font-weight: bold;
}

.affiliation {
color: @text-muted;
}

.date_start {
color: @text-muted;
}

.orcid {
font-size: @font-size-small;
margin-left: 0.2rem;
margin-right: 0.2rem;
}

.orcid_icon {
width: 1.4rem;
height: 1.4rem;
margin: 0;
}
}
}
4 changes: 1 addition & 3 deletions templates/frontend/components/registrationForm.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
<div class="form-group family_name">
<label>
{translate key="user.familyName"}
<span class="form-control-required">*</span>
<span class="sr-only">{translate key="common.required"}</span>
<input class="form-control" type="text" name="familyName" id="familyName" value="{$familyName|escape}" maxlength="255" required>
<input class="form-control" type="text" name="familyName" id="familyName" value="{$familyName|escape}" maxlength="255">
</label>
</div>
<div class="form-group affiliation">
Expand Down
12 changes: 6 additions & 6 deletions templates/frontend/components/registrationFormContexts.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@
<div class="form-inline">
<div class="form-group context_roles">
{foreach from=$readerUserGroups[$contextId] item=userGroup}
{if $userGroup->getPermitSelfRegistration()}
{assign var="userGroupId" value=$userGroup->getId()}
{if $userGroup->permitSelfRegistration}
{assign var="userGroupId" value=$userGroup->id}
<label class="input-group">
<span class="input-group-addon">
<input type="checkbox" name="readerGroup[{$userGroupId}]"{if in_array($userGroupId, $userGroupIds)} checked="checked"{/if}>
</span>
<span class="form-control">
{$userGroup->getLocalizedName()|escape}
{$userGroup->getLocalizedData('name')|escape}
</span>
</label>
{if in_array($userGroupId, $userGroupIds)}
Expand All @@ -58,14 +58,14 @@
{/if}
{/foreach}
{foreach from=$reviewerUserGroups[$contextId] item=userGroup}
{if $userGroup->getPermitSelfRegistration()}
{assign var="userGroupId" value=$userGroup->getId()}
{if $userGroup->permitSelfRegistration}
{assign var="userGroupId" value=$userGroup->id}
<label class="input-group">
<span class="input-group-addon">
<input type="checkbox" name="reviewerGroup[{$userGroupId}]"{if in_array($userGroupId, $userGroupIds)} checked="checked"{/if}>
</span>
<span class="form-control">
{$userGroup->getLocalizedName()|escape}
{$userGroup->getLocalizedData('name')|escape}
</span>
</label>
{if in_array($userGroupId, $userGroupIds)}
Expand Down
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 -->
37 changes: 26 additions & 11 deletions templates/frontend/objects/article_details.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,21 @@
* @brief View of an Article which displays all details about the article.
* Expected to be primary object on the page.
*
* @uses $article Article This article
* @uses $article Submission This article
* @uses $issue Issue The issue this article is assigned to
* @uses $section Section The journal section this article is assigned to
* @uses $keywords array List of keywords assigned to this article
* @uses $pubIdPlugins @todo
* @uses $pubIdPlugins Array of pubId plugins which this article may be assigned
*}
<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 @@ -163,18 +170,26 @@
{foreach from=$publication->getData('authors') item=author}
<div class="author">
<strong>{$author->getFullName()|escape}</strong>
{if $author->getLocalizedAffiliation()}
{if count($author->getAffiliations()) > 0}
<div class="article-author-affiliation">
{$author->getLocalizedAffiliation()|escape}
{foreach name="affiliations" from=$author->getAffiliations() item="affiliation"}
{$affiliation->getLocalizedName()|escape}
{if $affiliation->getRor()}
<a href="{$affiliation->getRor()|escape}">{$rorIdIcon}</a>
{/if}
{if !$smarty.foreach.affiliations.last}{translate key="common.commaListSeparator"}{/if}
{/foreach}
</div>
{/if}
{if $author->getOrcid()}
{if $author->getData('orcid')}
<div class="orcid">
{if $author->getData('orcidAccessToken')}
{if $author->hasVerifiedOrcid()}
{$orcidIcon}
{else}
{$orcidUnauthenticatedIcon}
{/if}
<a href="{$author->getOrcid()|escape}" target="_blank">
{$author->getOrcid()|escape}
<a href="{$author->getData('orcid')|escape}" target="_blank">
{$author->getOrcidDisplayValue()|escape}
</a>
</div>
{/if}
Expand Down Expand Up @@ -323,10 +338,10 @@
<div class="media biography">
<div class="media-body">
<h3 class="media-heading biography-author">
{if $author->getLocalizedAffiliation()}
{if $author->getLocalizedAffiliationNamesAsString()}
{capture assign="authorName"}{$author->getFullName()|escape}{/capture}
{capture assign="authorAffiliation"}<span class="affiliation">{$author->getLocalizedAffiliation()|escape}</span>{/capture}
{translate key="submission.authorWithAffiliation" name=$authorName affiliation=$authorAffiliation}
{capture assign="authorAffiliations"}<span class="affiliation">{$author->getLocalizedAffiliationNamesAsString(null, ', ')|escape}</span>{/capture}
{translate key="submission.authorWithAffiliation" name=$authorName affiliation=$authorAffiliations}
{else}
{$author->getFullName()|escape}
{/if}
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
5 changes: 4 additions & 1 deletion templates/frontend/pages/about.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@

{* Page Title *}
<div class="page-header">
<h1>{translate key="about.aboutContext"}</h1>
<h1>
{translate key="about.aboutContext"}
</h1>
{include file="frontend/components/editLink.tpl" page="management" op="settings" path="context" anchor="masthead" sectionTitleKey="about.aboutContext"}
</div>
{* /Page Title *}

Expand Down
Loading

0 comments on commit e7ea0ab

Please sign in to comment.