summaryrefslogtreecommitdiff
path: root/public/app/views/admin/admin-menu.php
diff options
context:
space:
mode:
authorGeorge Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2023-04-27 03:47:30 +0300
committerGeorge Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2023-04-27 03:47:30 +0300
commit059e0d95d0c28bc5060e87e146eaf7411f51bf90 (patch)
tree7c21ac432f16dde2329a0d5954d70711eceb48e6 /public/app/views/admin/admin-menu.php
parent26cd8ee99659ef1926c96a049c93645ffc9b169d (diff)
downloadgyraf1gov-059e0d95d0c28bc5060e87e146eaf7411f51bf90.tar.gz
gyraf1gov-059e0d95d0c28bc5060e87e146eaf7411f51bf90.tar.bz2
gyraf1gov-059e0d95d0c28bc5060e87e146eaf7411f51bf90.zip
skeleton commit; based on an anom project
Diffstat (limited to 'public/app/views/admin/admin-menu.php')
-rw-r--r--public/app/views/admin/admin-menu.php47
1 files changed, 47 insertions, 0 deletions
diff --git a/public/app/views/admin/admin-menu.php b/public/app/views/admin/admin-menu.php
new file mode 100644
index 0000000..52e8522
--- /dev/null
+++ b/public/app/views/admin/admin-menu.php
@@ -0,0 +1,47 @@
+<?php
+/** admin panel
+ * -----------------------------------------------------------------------------
+ *
+ * imported variables:
+ * ---
+ * @param $action (string): array of articles
+ * @param $id (int): id of entity (when editing entity) | 0: new entity
+ *
+ * example call:
+ * ---
+ * Render::template("sections/admin_panel.php",[
+ * 'action' => 'posts',
+ * 'id' => 4
+ * ])
+ * -----------------------------------------------------------------------------
+ */
+
+$admin_options = [
+ 'panel' => 'Διαχείριση',
+ 'edit_lesson' => 'Νέο Μάθημα',
+ 'lessons' => 'Μαθήματα',
+ 'categories' => 'Κεφάλαια',
+ 'pages' => 'Σελίδες',
+ 'files' => 'Αρχεία',
+ 'privileges' => 'Πρόσβαση',
+ 'users' => 'Χρήστες'
+];
+?>
+
+<div class="top-bar">
+
+ <?php foreach($admin_options as $opt => $label) : ?>
+
+ <?php if (($opt == $action) & (!$id)) : ?>
+ <span class="btn btn-primary selected"><?=$label?></span>
+
+ <?php else : ?>
+ <a href="/admin/<?= $opt ?>" class="btn"><?= $label ?></a>
+
+ <?php endif; ?>
+
+ <?php endforeach ?>
+
+ <a href="/logout" class="btn">Logout</a>
+
+</div> \ No newline at end of file