summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/app/routes/backend.php26
-rw-r--r--public/app/views/components/user-management.php9
2 files changed, 27 insertions, 8 deletions
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 @@
+<?php
+use \app\controllers\Auth;
+?>
<div class="user">
<div class="dropdown js-visitor">
@@ -22,6 +25,12 @@
Διαχείριση Λογαριασμού <span class="caret"></span>
</button>
<ul class="dropdown-menu">
+
+ <?php if (Auth::in_admin_group()) : ?>
+ <li><a class="dropdown-item" href="/admin">Διαχείριση Περιεχομένου</a></li>
+ <li><hr class="dropdown-divider"></li>
+ <?php endif ?>
+
<li><a class="dropdown-item" href="/account/profile">Διαχείριση Προφίλ</a></li>
<li><a class="dropdown-item" href="/account/courses">Ύλη μαθημάτων</a></li>
<li><a class="dropdown-item" href="/account/payments">Πληρωμές</a></li>