diff options
Diffstat (limited to 'public/app/views/admin/admin-menu.php')
| -rw-r--r-- | public/app/views/admin/admin-menu.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/public/app/views/admin/admin-menu.php b/public/app/views/admin/admin-menu.php index d7e7b09..a06d2eb 100644 --- a/public/app/views/admin/admin-menu.php +++ b/public/app/views/admin/admin-menu.php @@ -4,26 +4,26 @@ * * imported variables: * --- - * @param $action (string) : array of articles + * @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 = [ - 'new_lesson' => 'Νέο Μάθημα', + 'edit_lesson' => 'Νέο Μάθημα', 'lessons' => 'Μαθήματα', 'categories' => 'Κατηγορίες', 'pages' => 'Σελίδες', 'privileges' => 'Πρόσβαση', 'users' => 'Χρήστες' ]; - ?> <div class="top-bar"> @@ -32,7 +32,7 @@ $admin_options = [ <?php foreach($admin_options as $opt => $label) : ?> - <?php if ($opt == $action) : ?> + <?php if (($opt == $action) & (!$id)) : ?> <span class="btn btn-primary selected"><?=$label?></span> <?php else : ?> |
