diff --git a/pages/preprints/SectionsHandler.php b/pages/preprints/SectionsHandler.php index d3710c441e..202ea0828d 100644 --- a/pages/preprints/SectionsHandler.php +++ b/pages/preprints/SectionsHandler.php @@ -105,11 +105,6 @@ public function section($args, $request) exit; } - $submissions = []; - foreach ($submissions as $submission) { - $submissions[] = $submission; - } - $showingStart = $collector->offset + 1; $showingEnd = min($collector->offset + $collector->count, $collector->offset + count($submissions)); $nextPage = $total > $showingEnd ? $page + 1 : null; @@ -120,6 +115,7 @@ public function section($args, $request) 'section' => $section, 'sectionPath' => $sectionPath, 'preprints' => $submissions, + 'authorUserGroups' => Repo::userGroup()->getCollector()->filterByRoleIds([\PKP\security\Role::ROLE_ID_AUTHOR])->filterByContextIds([$context->getId()])->getMany()->remember(), 'showingStart' => $showingStart, 'showingEnd' => $showingEnd, 'total' => $total, diff --git a/templates/frontend/pages/sections.tpl b/templates/frontend/pages/sections.tpl index e1361f86e7..68f1140d22 100644 --- a/templates/frontend/pages/sections.tpl +++ b/templates/frontend/pages/sections.tpl @@ -46,12 +46,12 @@ {* Pagination *} {if $prevPage > 1} - {capture assign="prevUrl"}{url router=PKPApplication::ROUTE_PAGE page="section" op="view" path=$sectionPath|to_array:$prevPage}{/capture} + {capture assign="prevUrl"}{url router=PKPApplication::ROUTE_PAGE page="preprints" op="section" path=$sectionPath|to_array:$prevPage}{/capture} {elseif $prevPage === 1} - {capture assign="prevUrl"}{url router=PKPApplication::ROUTE_PAGE page="section" op="view" path=$sectionPath}{/capture} + {capture assign="prevUrl"}{url router=PKPApplication::ROUTE_PAGE page="preprints" op="section" path=$sectionPath}{/capture} {/if} {if $nextPage} - {capture assign="nextUrl"}{url router=PKPApplication::ROUTE_PAGE page="section" op="view" path=$sectionPath|to_array:$nextPage}{/capture} + {capture assign="nextUrl"}{url router=PKPApplication::ROUTE_PAGE page="preprints" op="section" path=$sectionPath|to_array:$nextPage}{/capture} {/if} {include file="frontend/components/pagination.tpl"