From 9449b8beef6d83c16a19c160d7c8bc0bf1a02157 Mon Sep 17 00:00:00 2001 From: George Halkiadakis Date: Sun, 30 Apr 2023 00:46:48 +0300 Subject: hotfixes: admin redirectrio, admin menu entry --- public/app/routes/backend.php | 26 +++++++++++++++++-------- public/app/views/components/user-management.php | 9 +++++++++ 2 files changed, 27 insertions(+), 8 deletions(-) (limited to 'public/app') diff --git a/public/app/routes/backend.php b/public/app/routes/backend.php index 027c50a..3a1f024 100644 --- a/public/app/routes/backend.php +++ b/public/app/routes/backend.php @@ -17,17 +17,27 @@ use app\extends\Cache_service; Route::add('/admin', function () { // admin panel Auth::allowRoles([1, 2, 3]); // allow few admin-panel roles - Render::view('admin/skeleton', [ - 'title' => 'Διαχείριση Classroom', - 'action' => 'panel', - ]); + + // TODO: admin control panel + // Render::view('admin/skeleton', [ + // 'title' => 'Διαχείριση Classroom', + // 'action' => 'panel', + // ]); + + // teporarily redirect to edit-lessons + header('Location: /admin/lessons'); + }); Route::add('/admin/panel', function () { // admin panel #2 Auth::allowRoles([1, 2, 3]); - Render::view('admin/skeleton', [ - 'title' => 'Διαχείριση Classroom', - 'action' => 'panel', - ]); + // TODO: admin control panel + // Render::view('admin/skeleton', [ + // 'title' => 'Διαχείριση Classroom', + // 'action' => 'panel', + // ]); + + // teporarily redirect to edit-lessons + header('Location: /admin/lessons'); }); diff --git a/public/app/views/components/user-management.php b/public/app/views/components/user-management.php index 636f2ff..7127471 100644 --- a/public/app/views/components/user-management.php +++ b/public/app/views/components/user-management.php @@ -1,3 +1,6 @@ +