diff options
Diffstat (limited to 'public/app/views/admin/skeleton.php')
| -rw-r--r-- | public/app/views/admin/skeleton.php | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/public/app/views/admin/skeleton.php b/public/app/views/admin/skeleton.php index fea346f..927bd2d 100644 --- a/public/app/views/admin/skeleton.php +++ b/public/app/views/admin/skeleton.php @@ -7,7 +7,9 @@ <?php // header includes //////////////////////////////////////////////////////////////////////// - Render::view('components/header_includes', ['administration' => true]); + Render::view('components/header_includes', //////////////////////////// + ['administration' => true] + ); ?> @@ -17,16 +19,26 @@ <div class="classroom admin-container"> <?php - Render::view('admin/admin-menu',[ - 'action' => $action - ]) - ?> - - <?php - Render::view("admin/{$action}"); + // sometimes an ID (int) is needed + // ex. editing a page or a lesson we need page-ID or lesson-ID + // --- -- -- - - - + if (!isset($id)) $id=0; + + // render menu + //////////////////////////////////////////////////////////////////// + Render::view('admin/admin-menu',[ //////////////////////////// + 'action' => $action, + 'id' => $id + ]); + + // render main content + //////////////////////////////////////////////////////////////////// + Render::view("admin/{$action}",[ 'id' => $id ]); //////////////// ?> </div> + <!-- js admin script --> + <script>var entity_id = <?= $id ?>;</script> <script src="/assets/js/admin/<?= $action ?>.js"></script> </body> |
