Skip to content

Commit

Permalink
pkp/pkp-lib#10200 remove editorial team, add editorial masthead and h…
Browse files Browse the repository at this point in the history
…istory templates
  • Loading branch information
kaitlinnewson committed Dec 13, 2024
1 parent 75d33e3 commit 78ea323
Show file tree
Hide file tree
Showing 5 changed files with 185 additions and 30 deletions.
1 change: 1 addition & 0 deletions styles/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
@import "pages/page-view-html";
@import "pages/page-author-details";
@import "pages/page-catalog-category";
@import "pages/page-masthead";

@import "components/sidebar";
@import "components/footer";
36 changes: 36 additions & 0 deletions styles/pages/page-masthead.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* @file styles/pages/page-masthead.less
*
* 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 Styles applying to the masthead and editorial history page
* @link templates/frontend/pages/editorialMasthead.tpl
* @link templates/frontend/pages/editorialHistory.tpl
*/

.page-masthead {
.user_listing {
list-style-type: none;
padding: 0;
margin-top: 2rem;

li {
margin-bottom: 2rem;
}

li > span {
display: block;
}

.name {
font-weight: bold;
}

.orcid {
margin-left: 0.2rem;
margin-right: 0.2rem;
}
}
}
63 changes: 63 additions & 0 deletions templates/frontend/pages/editorialHistory.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{**
* templates/frontend/pages/editorialHistory.tpl
*
* Copyright (c) 2024 Simon Fraser University
* Copyright (c) 2024 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* @brief Display context's editorial history page.
*
*}
{include file="frontend/components/header.tpl" pageTitle="common.editorialHistory"}

<div class="container page page-masthead">
<div class="page-header">
<h1>{translate key="common.editorialHistory.page"}</h1>
</div>

<div class="row justify-content-md-center">
<div class="col-md-6">
<div class="page-content">
<p>{translate key="common.editorialHistory.page.description"}</p>

{foreach from=$mastheadRoles item="mastheadRole"}
{if array_key_exists($mastheadRole->getId(), $mastheadUsers)}
<h2>{$mastheadRole->getLocalizedName()|escape}</h2>
<ul class="user_listing" role="list">
{foreach from=$mastheadUsers[$mastheadRole->getId()] item="mastheadUser"}
<li>
{strip}
<span class="date_start">
{foreach name="services" from=$mastheadUser['services'] item="service"}
{translate key="common.fromUntil" from=$service['dateStart'] until=$service['dateEnd']}
{if !$smarty.foreach.services.last}{translate key="common.commaListSeparator"}{/if}
{/foreach}
</span>
<span class="name">
{$mastheadUser['user']->getFullName()|escape}
{if $mastheadUser['user']->getData('orcid') && $mastheadUser['user']->getData('orcidAccessToken')}
<span class="orcid">
<a href="{$mastheadUser['user']->getData('orcid')|escape}" target="_blank" aria-label="{translate key="common.editorialHistory.page.orcidLink" name=$mastheadUser['user']->getFullName()|escape}">
{$orcidIcon}
</a>
</span>
{/if}
</span>
{if !empty($mastheadUser['user']->getLocalizedData('affiliation'))}
<span class="affiliation">{$mastheadUser['user']->getLocalizedData('affiliation')|escape}</span>
{/if}
{/strip}
</li>
{/foreach}
</ul>
{/if}
{/foreach}
</div>

{$currentContext->getLocalizedData('editorialHistory')}
{include file="frontend/components/editLink.tpl" page="management" op="settings" path="context" anchor="masthead" sectionTitleKey="common.editorialHistory"}
</div>
</div>
</div>

{include file="frontend/components/footer.tpl"}
85 changes: 85 additions & 0 deletions templates/frontend/pages/editorialMasthead.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{**
* templates/frontend/pages/editorialMasthead.tpl
*
* Copyright (c) 2024 Simon Fraser University
* Copyright (c) 2024 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* @brief Display context's editorial masthead page.
*
*}
{include file="frontend/components/header.tpl" pageTitle="common.editorialMasthead"}

<div class="container page page-masthead">
<div class="page-header">
<h1>{translate key="common.editorialMasthead"}</h1>
</div>

<div class="row justify-content-md-center">
<div class="col-md-6">
<div class="page-content">
{foreach from=$mastheadRoles item="mastheadRole"}
{if array_key_exists($mastheadRole->getId(), $mastheadUsers)}
<h2>{$mastheadRole->getLocalizedName()|escape}</h2>
<ul class="user_listing" role="list">
{foreach from=$mastheadUsers[$mastheadRole->getId()] item="mastheadUser"}
<li>
{strip}
<span class="date_start">{translate key="common.fromUntil" from=$mastheadUser['dateStart'] until=""}</span>
<span class="name">
{$mastheadUser['user']->getFullName()|escape}
{if $mastheadUser['user']->getData('orcid') && $mastheadUser['user']->getData('orcidAccessToken')}
<span class="orcid">
<a href="{$mastheadUser['user']->getData('orcid')|escape}" target="_blank" aria-label="{translate key="common.editorialHistory.page.orcidLink" name=$mastheadUser['user']->getFullName()|escape}">
{$orcidIcon}
</a>
</span>
{/if}
</span>
{if !empty($mastheadUser['user']->getLocalizedData('affiliation'))}
<span class="affiliation">{$mastheadUser['user']->getLocalizedData('affiliation')|escape}</span>
{/if}
{/strip}
</li>
{/foreach}
</ul>
{/if}
{/foreach}

<hr>
<p>
{capture assign=editorialHistoryUrl}{url page="about" op="editorialHistory" router=\PKP\core\PKPApplication::ROUTE_PAGE}{/capture}
{translate key="about.editorialMasthead.linkToEditorialHistory" url=$editorialHistoryUrl}
</p>

{if !empty($reviewers)}
<h2>{translate key="common.editorialMasthead.peerReviewers"}</h2>
<p>{translate key="common.editorialMasthead.peerReviewers.description" year=$previousYear}</p>
<ul class="user_listing" role="list">
{foreach from=$reviewers item="reviewer"}
<li>
{strip}
<span class="name">
{$reviewer->getFullName()|escape}
{if $reviewer->getData('orcid') && $reviewer->getData('orcidAccessToken')}
<span class="orcid">
<a href="{$reviewer->getData('orcid')|escape}" target="_blank" aria-label="{translate key="common.editorialHistory.page.orcidLink" name=$reviewer->getFullName()|escape}">
{$orcidIcon}
</a>
</span>
{/if}
</span>
{if !empty($reviewer->getLocalizedData('affiliation'))}
<span class="affiliation">{$reviewer->getLocalizedData('affiliation')|escape}</span>
{/if}
{/strip}
</li>
{/foreach}
</ul>
{/if}
</div>
</div>
</div>
</div>

{include file="frontend/components/footer.tpl"}
30 changes: 0 additions & 30 deletions templates/frontend/pages/editorialTeam.tpl

This file was deleted.

0 comments on commit 78ea323

Please sign in to comment.