diff --git a/public/index.php b/public/index.php index be62430..0826dfc 100644 --- a/public/index.php +++ b/public/index.php @@ -53,11 +53,20 @@ function render_header(string $title): void if (can('clients.view')) echo 'Clients'; if (can('jobcards.view')) echo 'Jobcards'; if (can('reports.view')) echo 'Reports'; - if (can('users.manage')) echo 'Users & roles'; - if (can('roles.manage')) echo 'Roles & permissions'; - if ($user['role_name'] === 'Administrator') echo 'Settings'; - if (can('notifications.view')) echo 'Notifications'; - if (can('audit.view')) echo 'Audit trail'; + if ($user['role_name'] === 'Administrator') { + echo '
'; + if (can('users.manage')) echo 'Users & roles'; + if (can('roles.manage')) echo 'Roles & permissions'; + echo 'Settings'; + if (can('notifications.view')) echo 'Notifications'; + if (can('audit.view')) echo 'Audit trail'; + echo '
'; + } else { + if (can('users.manage')) echo 'Users & roles'; + if (can('roles.manage')) echo 'Roles & permissions'; + if (can('notifications.view')) echo 'Notifications'; + if (can('audit.view')) echo 'Audit trail'; + } echo '
'; } else { echo '
';