diff options
| author | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-06-06 00:46:19 +0300 |
|---|---|---|
| committer | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-06-06 00:46:19 +0300 |
| commit | 1388a64651f1c61a6aafc32f8e3e60f7a6ffd339 (patch) | |
| tree | dd5bcd7b438929ffec89d32011144831eebabb06 /public/app/views/xx--admin/admin-menu.php | |
| parent | d5475ce60729c3f743a6451b42072f1a13ffed59 (diff) | |
| download | gyraf1gov-1388a64651f1c61a6aafc32f8e3e60f7a6ffd339.tar.gz gyraf1gov-1388a64651f1c61a6aafc32f8e3e60f7a6ffd339.tar.bz2 gyraf1gov-1388a64651f1c61a6aafc32f8e3e60f7a6ffd339.zip | |
admin petition ready
Diffstat (limited to 'public/app/views/xx--admin/admin-menu.php')
| -rw-r--r-- | public/app/views/xx--admin/admin-menu.php | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/public/app/views/xx--admin/admin-menu.php b/public/app/views/xx--admin/admin-menu.php new file mode 100644 index 0000000..52e8522 --- /dev/null +++ b/public/app/views/xx--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 |
