From a5a94f55d30a9c7165ef348d253d255ade4005b2 Mon Sep 17 00:00:00 2001 From: Kaitlin Newson Date: Tue, 7 Jan 2025 11:53:20 -0400 Subject: [PATCH] pkp/pkp-lib#10200 remove editorial team, add editorial masthead and history templates --- resources/less/import.less | 1 + resources/less/pages/masthead.less | 48 +++++++++++ templates/frontend/pages/editorialHistory.tpl | 65 ++++++++++++++ .../frontend/pages/editorialMasthead.tpl | 86 +++++++++++++++++++ templates/frontend/pages/editorialTeam.tpl | 30 ------- 5 files changed, 200 insertions(+), 30 deletions(-) create mode 100644 resources/less/pages/masthead.less create mode 100644 templates/frontend/pages/editorialHistory.tpl create mode 100644 templates/frontend/pages/editorialMasthead.tpl delete mode 100755 templates/frontend/pages/editorialTeam.tpl diff --git a/resources/less/import.less b/resources/less/import.less index eb1a405..4035f96 100644 --- a/resources/less/import.less +++ b/resources/less/import.less @@ -39,3 +39,4 @@ @import "pages/catalogCategory"; @import "pages/orcidProfile"; @import "pages/announcement"; +@import "pages/masthead"; diff --git a/resources/less/pages/masthead.less b/resources/less/pages/masthead.less new file mode 100644 index 0000000..420828e --- /dev/null +++ b/resources/less/pages/masthead.less @@ -0,0 +1,48 @@ +/* + * @file plugins/themes/default/styles/pages/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: 5vh; + + li { + margin-bottom: 5vh; + } + + li > span { + display: block; + } + + .name { + font-weight: bold; + } + + .orcid { + font-size: smaller; + margin-left: 0.2rem; + margin-right: 0.2rem; + + a:after { + border-bottom: 0; + } + } + + .orcid_icon { + width: 1.4rem; + height: 1.4rem; + margin: 0; + display: inline-block; + } + } +} diff --git a/templates/frontend/pages/editorialHistory.tpl b/templates/frontend/pages/editorialHistory.tpl new file mode 100644 index 0000000..6cc2f6e --- /dev/null +++ b/templates/frontend/pages/editorialHistory.tpl @@ -0,0 +1,65 @@ +{** + * 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"} +
+
+
+
+

+ {translate key="common.editorialHistory.page"} +

+ {include file="frontend/components/editLink.tpl" page="management" op="settings" path="context" anchor="masthead" sectionTitleKey="common.editorialHistory"} +
+ +
+

+ {translate key="common.editorialHistory.page.description"} +

+ {foreach from=$mastheadRoles item="mastheadRole"} + {if array_key_exists($mastheadRole->id, $mastheadUsers)} +

{$mastheadRole->getLocalizedData('name')|escape}

+
    + {foreach from=$mastheadUsers[$mastheadRole->id] item="mastheadUser"} +
  • + {strip} + + {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} + + + {$mastheadUser['user']->getFullName()|escape} + {if $mastheadUser['user']->getData('orcid') && $mastheadUser['user']->getData('orcidAccessToken')} + + getFullName()|escape}"> + {$orcidIcon} + + + {/if} + + {if !empty($mastheadUser['user']->getLocalizedData('affiliation'))} + {$mastheadUser['user']->getLocalizedData('affiliation')|escape} + {/if} + {/strip} +
  • + {/foreach} +
+ {/if} + {/foreach} + + {$currentContext->getLocalizedData('editorialHistory')} +
+
+
+
+ +{include file="frontend/components/footer.tpl"} diff --git a/templates/frontend/pages/editorialMasthead.tpl b/templates/frontend/pages/editorialMasthead.tpl new file mode 100644 index 0000000..f8248dc --- /dev/null +++ b/templates/frontend/pages/editorialMasthead.tpl @@ -0,0 +1,86 @@ +{** + * 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"} +
+
+
+
+

+ {translate key="common.editorialMasthead"} +

+
+
+ {foreach from=$mastheadRoles item="mastheadRole"} + {if array_key_exists($mastheadRole->id, $mastheadUsers)} +

{$mastheadRole->getLocalizedData('name')|escape}

+
    + {foreach from=$mastheadUsers[$mastheadRole->id] item="mastheadUser"} +
  • + {strip} + + {translate key="common.fromUntil" from=$mastheadUser['dateStart'] until=""} + + + {$mastheadUser['user']->getFullName()|escape} + {if $mastheadUser['user']->getData('orcid') && $mastheadUser['user']->getData('orcidAccessToken')} + + getFullName()|escape}"> + {$orcidIcon} + + + {/if} + + {if !empty($mastheadUser['user']->getLocalizedData('affiliation'))} + {$mastheadUser['user']->getLocalizedData('affiliation')|escape} + {/if} + {/strip} +
  • + {/foreach} +
+ {/if} + {/foreach} +
+

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

+ + {if !empty($reviewers)} +

{translate key="common.editorialMasthead.peerReviewers"}

+

{translate key="common.editorialMasthead.peerReviewers.description" year=$previousYear}

+
    + {foreach from=$reviewers item="reviewer"} +
  • + {strip} + + {$reviewer->getFullName()|escape} + {if $reviewer->getData('orcid') && $reviewer->getData('orcidAccessToken')} + + getFullName()|escape}"> + {$orcidIcon} + + + {/if} + + {if !empty($reviewer->getLocalizedData('affiliation'))} + {$reviewer->getLocalizedData('affiliation')|escape} + {/if} + {/strip} +
  • + {/foreach} +
+ {/if} +
+
+
+
+ +{include file="frontend/components/footer.tpl"} diff --git a/templates/frontend/pages/editorialTeam.tpl b/templates/frontend/pages/editorialTeam.tpl deleted file mode 100755 index 87925db..0000000 --- a/templates/frontend/pages/editorialTeam.tpl +++ /dev/null @@ -1,30 +0,0 @@ -{** - * templates/frontend/pages/editorialTeam.tpl - * - * Copyright (c) 2014-2020 Simon Fraser University - * Copyright (c) 2003-2020 John Willinsky - * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING. - * - * @brief Display the page to view the editorial team. - * - * @uses $currentContext Journal|Press The current journal or press - *} -{include file="frontend/components/header.tpl" pageTitle="about.editorialTeam"} - -
-
-
-
-

- {translate key="about.editorialTeam"} -

- {include file="frontend/components/editLink.tpl" page="management" op="settings" path="context" anchor="masthead" sectionTitleKey="about.editorialTeam"} -
-
- {$currentContext->getLocalizedSetting('editorialTeam')} -
-
-
-
- -{include file="frontend/components/footer.tpl"}