Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.5.0 compatibility #236

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
1 change: 1 addition & 0 deletions BootstrapThreeThemePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,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 -->
20 changes: 15 additions & 5 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 @@ -166,15 +173,18 @@
{if $author->getLocalizedAffiliation()}
<div class="article-author-affiliation">
{$author->getLocalizedAffiliation()|escape}
{if $author->getData('rorId')}
<a href="{$author->getData('rorId')|escape}">{$rorIdIcon}</a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is subject to change based on @GaziYucel's active work on RORs and multiple affiliations.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'm keeping an eye on that issue and can either wait to merge the theme updates or do another PR once that has been merged.

{/if}
</div>
{/if}
{if $author->getOrcid()}
{if $author->getData('orcid')}
<div class="orcid">
{if $author->getData('orcidAccessToken')}
{$orcidIcon}
{/if}
<a href="{$author->getOrcid()|escape}" target="_blank">
{$author->getOrcid()|escape}
<a href="{$author->getData('orcid')|escape}" target="_blank">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth pinging @ewhanson to see how this might change with his nearly-complete ORCiD work.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is already compliant with ORCID move to the core -- I am not sure, but I think the way orcid is displayed should not change any more, but maybe to double check. If it changes, it will change in the core and then also themes need to be considered (again)...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirmed with @ewhanson that there aren't further changes planned to ORCID for 3.5 that will impact the templates.

{$author->getData('orcid')|escape}
</a>
</div>
{/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