From 78ea32355e4d4e1e2405598439aa985e88d4e30f Mon Sep 17 00:00:00 2001 From: Kaitlin Newson Date: Fri, 13 Dec 2024 15:34:52 -0400 Subject: [PATCH] pkp/pkp-lib#10200 remove editorial team, add editorial masthead and history templates --- styles/index.less | 1 + styles/pages/page-masthead.less | 36 ++++++++ templates/frontend/pages/editorialHistory.tpl | 63 ++++++++++++++ .../frontend/pages/editorialMasthead.tpl | 85 +++++++++++++++++++ templates/frontend/pages/editorialTeam.tpl | 30 ------- 5 files changed, 185 insertions(+), 30 deletions(-) create mode 100644 styles/pages/page-masthead.less create mode 100644 templates/frontend/pages/editorialHistory.tpl create mode 100644 templates/frontend/pages/editorialMasthead.tpl delete mode 100644 templates/frontend/pages/editorialTeam.tpl diff --git a/styles/index.less b/styles/index.less index adf9565..2e8fa66 100644 --- a/styles/index.less +++ b/styles/index.less @@ -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"; diff --git a/styles/pages/page-masthead.less b/styles/pages/page-masthead.less new file mode 100644 index 0000000..446a86d --- /dev/null +++ b/styles/pages/page-masthead.less @@ -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; + } + } +} diff --git a/templates/frontend/pages/editorialHistory.tpl b/templates/frontend/pages/editorialHistory.tpl new file mode 100644 index 0000000..6632049 --- /dev/null +++ b/templates/frontend/pages/editorialHistory.tpl @@ -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"} + +
+ + +
+
+
+

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

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

{$mastheadRole->getLocalizedName()|escape}

+
    + {foreach from=$mastheadUsers[$mastheadRole->getId()] 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/editLink.tpl" page="management" op="settings" path="context" anchor="masthead" sectionTitleKey="common.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..0f268a0 --- /dev/null +++ b/templates/frontend/pages/editorialMasthead.tpl @@ -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"} + +
+ + +
+
+
+ {foreach from=$mastheadRoles item="mastheadRole"} + {if array_key_exists($mastheadRole->getId(), $mastheadUsers)} +

{$mastheadRole->getLocalizedName()|escape}

+
    + {foreach from=$mastheadUsers[$mastheadRole->getId()] 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 100644 index 8647511..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"} - -
- -
-
-
- {$currentContext->getLocalizedSetting('editorialTeam')} - {include file="frontend/components/editLink.tpl" page="management" op="settings" path="context" anchor="masthead" sectionTitleKey="about.editorialTeam"} -
-
-
-
- -{include file="frontend/components/footer.tpl"}