From 5fe4533f46ede8c3c6a182f83419467b1023be1b Mon Sep 17 00:00:00 2001 From: Kaitlin Newson Date: Fri, 3 Jan 2025 14:04:59 -0400 Subject: [PATCH] pkp/pkp-lib#10200 remove editorial team, add editorial masthead and history templates --- resources/less/import.less | 4 +- resources/less/pages/masthead.less | 34 ++++++++ templates/frontend/pages/editorialHistory.tpl | 61 ++++++++++++++ .../frontend/pages/editorialMasthead.tpl | 84 +++++++++++++++++++ templates/frontend/pages/editorialTeam.tpl | 30 ------- 5 files changed, 182 insertions(+), 31 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 cf5a530..7011c14 100644 --- a/resources/less/import.less +++ b/resources/less/import.less @@ -9,7 +9,7 @@ * */ -// styleshets +// stylesheets @import "fonts"; @import "variables"; @import "general"; @@ -31,3 +31,5 @@ @import "components/modal"; @import "components/recent-issues"; @import "components/catalog-category"; + +@import "pages/masthead"; diff --git a/resources/less/pages/masthead.less b/resources/less/pages/masthead.less new file mode 100644 index 0000000..2169ed5 --- /dev/null +++ b/resources/less/pages/masthead.less @@ -0,0 +1,34 @@ +/* + * @file less/pages/masthead.less + * + * Copyright (c) 2025 Simon Fraser University + * Copyright (c) 2025 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: 2em 0; + + li { + margin-bottom: 35px; + } + + li > span { + display: block; + } + + .name { + font-weight: bold; + } + + .orcid_icon { + margin-left: 5px; + } + } +} diff --git a/templates/frontend/pages/editorialHistory.tpl b/templates/frontend/pages/editorialHistory.tpl new file mode 100644 index 0000000..88f8c8d --- /dev/null +++ b/templates/frontend/pages/editorialHistory.tpl @@ -0,0 +1,61 @@ +{** + * templates/frontend/pages/editorialHistory.tpl + * + * Copyright (c) 2025 Simon Fraser University + * Copyright (c) 2025 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"} +

+
+ +

{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} +
+
+ {include file="frontend/components/editLink.tpl" page="management" op="settings" path="context" anchor="masthead" sectionTitleKey="common.editorialHistory"} + {$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..59dd1de --- /dev/null +++ b/templates/frontend/pages/editorialMasthead.tpl @@ -0,0 +1,84 @@ +{** + * templates/frontend/pages/editorialMasthead.tpl + * + * Copyright (c) 2025 Simon Fraser University + * Copyright (c) 2025 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 $reviewers->count()} +

{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 8e59e66..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"}