Skip to content

Commit

Permalink
pkp#9890 Define icons to be used for each sidebar navigation items
Browse files Browse the repository at this point in the history
  • Loading branch information
blesildaramirez committed May 6, 2024
1 parent c76000a commit aeb54a8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions classes/template/PKPTemplateManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -994,27 +994,31 @@ public function setupBackendPage()
'name' => __('navigation.dashboards'),
'url' => $router->url($request, null, 'dashboard', 'editorial'),
'isCurrent' => $router->getRequestedPage($request) === 'dashboards',
'icon' => 'Dashboard',
];
}
if(count(array_intersect([ Role::ROLE_ID_REVIEWER], $userRoles))) {
$menu['reviewAssignments'] = [
'name' => __('navigation.reviewAssignments'),
'url' => $router->url($request, null, 'dashboard', 'reviewAssignments'),
'isCurrent' => $router->getRequestedPage($request) === 'reviewAssignments',
'icon' => 'ReviewAssignments',
];
}
if(count(array_intersect([ Role::ROLE_ID_AUTHOR], $userRoles))) {
$menu['mySubmissions'] = [
'name' => __('navigation.mySubmissions'),
'url' => $router->url($request, null, 'dashboard', 'mySubmissions'),
'isCurrent' => $router->getRequestedPage($request) === 'mySubmissions',
'icon' => 'MySubmissions',
];
}
} else {
$menu['submissions'] = [
'name' => __('navigation.submissions'),
'url' => $router->url($request, null, 'submissions'),
'isCurrent' => $router->getRequestedPage($request) === 'submissions',
'icon' => 'MySubmissions'
];

}
Expand All @@ -1023,6 +1027,7 @@ public function setupBackendPage()
'name' => __('author.submit'),
'url' => $router->url($request, null, 'submission'),
'isCurrent' => $router->getRequestedPage($request) === 'submission',
'icon' => 'MySubmissions'
];
}

Expand All @@ -1040,6 +1045,7 @@ public function setupBackendPage()
'name' => __('doi.manager.displayName'),
'url' => $router->url($request, null, 'dois'),
'isCurrent' => $request->getRequestedPage() === 'dois',
'icon' => 'NavDoi'
];
}

Expand All @@ -1052,6 +1058,7 @@ public function setupBackendPage()
}
$menu['settings'] = [
'name' => __('navigation.settings'),
'icon' => 'Settings',
'submenu' => [
'context' => [
'name' => __('context.context'),
Expand Down Expand Up @@ -1085,6 +1092,7 @@ public function setupBackendPage()
if (count(array_intersect([Role::ROLE_ID_MANAGER, Role::ROLE_ID_SITE_ADMIN, Role::ROLE_ID_SUB_EDITOR], $userRoles))) {
$menu['statistics'] = [
'name' => __('navigation.tools.statistics'),
'icon' => 'Statistics',
'submenu' => [
'publications' => [
'name' => __('common.publications'),
Expand Down Expand Up @@ -1124,6 +1132,7 @@ public function setupBackendPage()
'name' => __('navigation.tools'),
'url' => $router->url($request, null, 'management', 'tools'),
'isCurrent' => $router->getRequestedPage($request) === 'management' && $router->getRequestedOp($request) === 'tools',
'icon' => 'Tools',
];
}

Expand All @@ -1132,6 +1141,7 @@ public function setupBackendPage()
'name' => __('navigation.admin'),
'url' => $router->url($request, 'index', 'admin'),
'isCurrent' => $router->getRequestedPage($request) === 'admin',
'icon' => 'NavAdmin',
];
}
}
Expand Down
2 changes: 2 additions & 0 deletions pages/management/ManagementHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ public function website($args, $request)
'name' => __('announcement.announcements'),
'url' => $router->url($request, null, 'management', 'settings', 'announcements'),
'isCurrent' => false,
'icon' => 'Announcements',
],
]);

Expand Down Expand Up @@ -333,6 +334,7 @@ public function distribution($args, $request)
'name' => __('institution.institutions'),
'url' => $router->url($request, null, 'management', 'settings', 'institutions'),
'isCurrent' => false,
'icon' => 'Institutes',
],
]);
$templateMgr->assign([
Expand Down

0 comments on commit aeb54a8

Please sign in to comment.