Skip to content

Commit 487f039

Browse files
pkp/pkp-lib#11071 Move Catalog link below Dashboard links on sidemenu
1 parent f051c83 commit 487f039

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

classes/template/TemplateManager.php

+16-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use APP\core\Application;
2222
use APP\core\Request;
2323
use APP\file\PublicFileManager;
24+
use PKP\config\Config;
2425
use PKP\context\Context;
2526
use PKP\core\PKPSessionGuard;
2627
use PKP\facades\Locale;
@@ -138,7 +139,21 @@ public function setupBackendPage()
138139
'icon' => 'Catalog'
139140
];
140141

141-
$index = array_search('submissions', array_keys($menu));
142+
$index = false;
143+
if (Config::getVar('features', 'enable_new_submission_listing')) {
144+
$reviewAssignmentsIndex = array_search('reviewAssignments', array_keys($menu));
145+
$mySubmissionsIndex = array_search('mySubmissions', array_keys($menu));
146+
if ($mySubmissionsIndex) {
147+
$index = $mySubmissionsIndex;
148+
} elseif ($reviewAssignmentsIndex) {
149+
$index = $reviewAssignmentsIndex;
150+
} else {
151+
$index = array_search('dashboards', array_keys($menu));
152+
}
153+
} else {
154+
$index = array_search('submissions', array_keys($menu));
155+
}
156+
142157
if ($index === false || count($menu) <= $index + 1) {
143158
$menu['catalog'] = $catalogLink;
144159
} else {

0 commit comments

Comments
 (0)