summaryrefslogtreecommitdiff
path: root/public/app/views/admin
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
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')
-rw-r--r--public/app/views/admin/admin-menu.php47
-rw-r--r--public/app/views/admin/categories.php91
-rw-r--r--public/app/views/admin/edit_lesson.php159
-rw-r--r--public/app/views/admin/edit_page.php139
-rw-r--r--public/app/views/admin/files.php96
-rw-r--r--public/app/views/admin/lessons.php126
-rw-r--r--public/app/views/admin/pages.php109
-rw-r--r--public/app/views/admin/panel.php4
-rw-r--r--public/app/views/admin/privileges.php93
-rw-r--r--public/app/views/admin/skeleton.php45
10 files changed, 909 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
diff --git a/public/app/views/admin/categories.php b/public/app/views/admin/categories.php
new file mode 100644
index 0000000..26fd5a2
--- /dev/null
+++ b/public/app/views/admin/categories.php
@@ -0,0 +1,91 @@
+ <!-- title bar -->
+ <div class="title-bar">
+ <div><h5>Διαχείριση Κατηγοριών</h5></div>
+ <div>
+ <!-- Button trigger modal -->
+ <button type="button" class="btn pull-right"
+ data-bs-toggle="modal" data-bs-target="#manageCategory" data-id="0">
+ <i class="fas fa-plus"></i> &nbsp; Νέο Κεφάλαιο
+ </button>
+ </div>
+</div>
+
+<div class="manage">
+ <div class="row">
+ <div class="col-md-12">
+
+ <div id="categories-tree">
+
+ <table id="dt-categories" class="table table-responsive dt-table" style="width:100%">
+ <thead>
+ <th class="dt-breadcrumb">Κατηγορία/Κεφάλαιο</th>
+ <th class="dt-actions"></th>
+ </thead>
+ </table>
+
+ </div>
+
+
+ </div>
+ </div>
+</div><!-- /manage -->
+
+
+
+<!-- MODAL for new/edit category -->
+<!-- NOTE: tabindex="-1" removed, ref:https://github.com/select2/select2-bootstrap-theme/issues/41 -->
+<div class="modal fade" id="manageCategory" aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-dialog modal-lg" role="document">
+ <div class="modal-content">
+
+ <form method="post" action="">
+
+ <div class="modal-header">
+ <h4 class="modal-title" id="myModalLabel">Modal title</h4>
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
+ </div><!-- /modal-header -->
+
+ <!-- modal-body -->
+ <div class="modal-body">
+
+ <!-- form fields -->
+
+ <div class="row form-group">
+ <label class="control-label col-sm-12" for="label">Όνομα κατηγορίας</label>
+ <div class="col-sm-12">
+ <input class="form-control form-control-sm" type="text" name="label" value="" required="">
+ </div>
+ </div>
+
+ <div class="row form-group">
+ <label class="control-label col-sm-12" for="parent_id">Γονική Κατηγορία</label>
+ <div class="col-sm-12">
+ <select class="form-control form-control-sm form-select form-select-sm" id="parent_id" name="parent_id" required></select>
+ </div>
+ </div>
+
+ <div class="row form-group">
+ <input type="hidden" name="id" value="0"><!-- action = (0) ? 'new' : 'edit' -->
+ </div>
+
+
+ </div><!-- /modal body -->
+
+ <div class="modal-footer">
+ <div class="row" style="width: 50%;">
+ <div class="form-actions">
+ <div class="col-4">
+ <button type="button" class="btn btn-default js-modal-close col-sm-12" data-bs-dismiss="modal">Κλείσιμο</button>
+ </div>
+ <div class="col-8">
+ <button class="btn btn-success col-sm-12" type="submit">Καταχώριση</button>
+ </div>
+ </div>
+ </div>
+ </div><!-- /modal-footer -->
+
+ </form><!-- /form -->
+
+ </div>
+ </div>
+</div>
diff --git a/public/app/views/admin/edit_lesson.php b/public/app/views/admin/edit_lesson.php
new file mode 100644
index 0000000..ef875b4
--- /dev/null
+++ b/public/app/views/admin/edit_lesson.php
@@ -0,0 +1,159 @@
+<?php
+ // some labels (if editing new or existing record)
+ // --- -- -- - - -
+ if ($id == 0) {
+ $action_title = "Δημιουργία Μαθήματος";
+ $action_button = "Δημιουργία";
+
+ } else {
+ $action_title = "Επεξεργασία Μαθήματος";
+ $action_button = "Αποθήκευση Αλλαγών";
+ }
+?>
+
+<!-- title bar -->
+<div class="title-bar">
+ <div><h5><?=$action_title?></h5></div>
+ <div>
+ <button type="button" class="btn pull-right"
+ data-bs-toggle="modal" data-bs-target="#editorModal" data-action="preview">
+ <i class="fas fa-search"></i> &nbsp; Προεπισκόπηση
+ </button>
+ </div>
+</div>
+
+<!-- manage -->
+<div class="manage edit-post">
+ <form>
+ <div class="row">
+
+
+ <div class="col col-8">
+
+ <!-- id (hidden) -->
+ <input type="hidden" name="id" value="0"><!-- action = (0) ? 'new' : 'edit' -->
+
+ <!--
+ <div class="row form-group">
+ <input type="date" name="date" value="" readonly="">
+ </div>
+ -->
+
+ <div class="row form-group">
+ <label class="control-label col-sm-12" for="title">Τίτλος</label>
+ <div class="col-sm-12">
+ <input class="form-control form-control-sm" type="text" name="title" value="" required="">
+ </div>
+ </div>
+
+ <div class="row form-group">
+ <label class="control-label col-sm-12" for="category_id">Κεφάλαιο</label>
+ <div class="col-sm-12">
+ <select class="form-control form-control-sm" id="course_id" name="course_id" required></select>
+ </div>
+ </div>
+
+ <!-- Post body -->
+ <div class="row form-group">
+ <label class="control-label col-sm-12" for="body">Κείμενο</label>
+ <div class="col-sm-12">
+ <textarea class="form-control form-control-sm" type="text" name="body" value="" required=""></textarea>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="col">
+
+ <div class="row form-group">
+ <label class="control-label col-sm-12" for="status">Κατάσταση</label>
+ <div class="col-sm-12">
+ <select class="form-control form-control-sm form-select form-select-sm" name="status" onchange="this.dataset.chosen = this.value;">
+ <option value="0">Αδημοσίευτο</option>
+ <option value="one">ΔΗΜΟΣΙΕΥΜΕΝΟ</option>
+ </select>
+ </div>
+ </div>
+
+ <div class="row form-group">
+ <label class="control-label col-sm-12" for="privilege_id">Επίπεδο Πρόσβασης</label>
+ <div class="col-sm-12">
+ <select class="form-control form-control-sm form-select form-select-sm" id="privilege_id" name="privilege_id">
+ </select>
+ </div>
+ </div>
+
+ <div class="row form-group">
+ <label class="control-label col-sm-12" for="intro">Σύντομη Περιγραφή</label>
+ <div class="col-sm-12">
+ <textarea class="form-control form-control-sm" type="text" name="intro" value=""></textarea>
+ </div>
+ </div>
+
+ <div class="row form-group">
+ <label class="control-label col-sm-12" for="media">Αρχεία</label>
+ <div class="col-sm-12 post-media">
+
+ <!-- Button trigger modal -->
+ <button type="button" class="btn btn-sm btn-success pull-right over-bar"
+ data-bs-toggle="modal" data-bs-target="#editorModal" data-action="upload_file">
+ <i class="fas fa-plus"></i> &nbsp; Προσθήκη
+ </button>
+
+ <ul id="files_list">
+ </ul>
+
+ </div>
+ </div>
+
+ <?php if ($id != 0) : ?>
+ <div class="row form-group">
+ <label class="control-label col-sm-12">Πληροφορίες</label>
+ <div class="col-sm-12" id="post-info">
+ </div>
+ </div>
+ <?php endif; ?>
+
+ </div>
+
+ </div>
+
+ <div class="row">
+
+ <div class="col">
+ <hr/>
+ <!-- close | submit buttons -->
+
+ <div class="form-actions row justify-content-md-center">
+
+ <div class="col-3">
+ <button type="button" id="go-back" class="btn btn-light col-sm-12">
+ Επιστροφή
+ </button>
+ </div>
+
+ <div class="col-4">
+ <button class="btn btn-primary col-sm-12" type="submit">
+ <?=$action_button?>
+ </button>
+ </div>
+
+ </div>
+
+ </div>
+
+ </form>
+
+ </div>
+</div><!-- /manage -->
+
+
+<!-- MODAL for file uploads and preview -->
+<div class="modal fade" id="editorModal" aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-dialog modal-lg" role="document">
+ <div class="modal-content">
+ <!-- content will be dynamic -->
+ </div>
+ </div>
+</div>
+
diff --git a/public/app/views/admin/edit_page.php b/public/app/views/admin/edit_page.php
new file mode 100644
index 0000000..46c47bc
--- /dev/null
+++ b/public/app/views/admin/edit_page.php
@@ -0,0 +1,139 @@
+<?php
+ // some labels (if editing new or existing record)
+ // --- -- -- - - -
+ if ($id == 0) {
+ $action_title = "Δημιουργία Σελίδας";
+ $action_button = "Δημιουργία";
+
+ } else {
+ $action_title = "Επεξεργασία Σελίδας";
+ $action_button = "Αποθήκευση Αλλαγών";
+ }
+?>
+
+<!-- title bar -->
+<div class="title-bar">
+ <div><h5><?=$action_title?></h5></div>
+ <div>
+ <button type="button" class="btn pull-right"
+ data-bs-toggle="modal" data-bs-target="#editorModal" data-action="preview">
+ <i class="fas fa-search"></i> &nbsp; Προεπισκόπηση
+ </button>
+ </div>
+</div>
+
+<!-- manage -->
+<div class="manage edit-page">
+ <form>
+ <div class="row">
+
+
+ <div class="col col-8">
+
+ <!-- id (hidden) -->
+ <input type="hidden" name="id" value="0"><!-- action = (0) ? 'new' : 'edit' -->
+
+ <!--
+ <div class="row form-group">
+ <input type="date" name="date" value="" readonly="">
+ </div>
+ -->
+
+ <div class="row form-group">
+ <label class="control-label col-sm-12" for="title">Τίτλος</label>
+ <div class="col-sm-12">
+ <input class="form-control form-control-sm" type="text" name="title" value="" required="">
+ </div>
+ </div>
+
+ <!-- Post body -->
+ <div class="row form-group">
+ <label class="control-label col-sm-12" for="body">Κείμενο</label>
+ <div class="col-sm-12">
+ <textarea class="form-control form-control-sm" type="text" name="body" value="" required=""></textarea>
+ </div>
+ </div>
+
+ </div>
+
+ <div class="col">
+
+ <div class="row form-group">
+ <label class="control-label col-sm-12" for="status">Κατάσταση</label>
+ <div class="col-sm-12">
+ <select class="form-control form-control-sm form-select form-select-sm" name="status" onchange="this.dataset.chosen = this.value;">
+ <option value="0">Αδημοσίευτο</option>
+ <option value="one">ΔΗΜΟΣΙΕΥΜΕΝΟ</option>
+ </select>
+ </div>
+ </div>
+
+ <div class="row form-group">
+ <label class="control-label col-sm-12" for="media">Αρχεία</label>
+ <div class="col-sm-12 post-media">
+
+ <!-- Button trigger modal -->
+ <button type="button" class="btn btn-sm btn-success pull-right over-bar"
+ data-bs-toggle="modal" data-bs-target="#editorModal" data-action="upload_file">
+ <i class="fas fa-plus"></i> &nbsp; Προσθήκη
+ </button>
+
+ <ul id="files_list">
+ </ul>
+
+ </div>
+ </div>
+
+ <?php if ($id != 0) : ?>
+ <!--
+ <div class="row form-group">
+ <label class="control-label col-sm-12">Πληροφορίες</label>
+ <div class="col-sm-12" id="post-info">
+ </div>
+ </div>
+ -->
+ <?php endif; ?>
+
+ </div>
+
+ </div>
+
+ <div class="row">
+
+ <div class="col">
+ <hr/>
+ <!-- close | submit buttons -->
+
+ <div class="form-actions row justify-content-md-center">
+
+ <div class="col-3">
+ <button type="button" id="go-back" class="btn btn-light col-sm-12">
+ Επιστροφή
+ </button>
+ </div>
+
+ <div class="col-4">
+ <button class="btn btn-primary col-sm-12" type="submit">
+ <?=$action_button?>
+ </button>
+ </div>
+
+ </div>
+
+ </div>
+
+ </form>
+
+ </div>
+</div><!-- /manage -->
+
+
+<!-- MODAL for file uploads and preview -->
+<div class="modal fade" id="editorModal" aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-dialog modal-lg" role="document">
+ <div class="modal-content">
+ <!-- content will be dynamic -->
+ </div>
+ </div>
+</div>
+
diff --git a/public/app/views/admin/files.php b/public/app/views/admin/files.php
new file mode 100644
index 0000000..c6d2771
--- /dev/null
+++ b/public/app/views/admin/files.php
@@ -0,0 +1,96 @@
+ <!-- title bar -->
+ <div class="title-bar">
+ <div><h5>Διαχείριση Επιπέδων Πρόσβασης</h5></div>
+ <div>
+ <!-- Button trigger modal
+ <button type="button" class="btn pull-right"
+ data-bs-toggle="modal" data-bs-target="#managePrivileges" data-id="0">
+ <i class="fas fa-plus"></i> &nbsp; Νέο Επίπεδο
+ </button>
+ -->
+ </div>
+</div>
+
+<div class="manage">
+ <div class="row">
+ <div class="col-md-12">
+
+ <div id="files">
+
+ <table id="dt-files" class="table table-responsive dt-table" style="width:100%">
+ <thead>
+ <th class="dt-id">α/α</th>
+ <th class="dt-label">Περιγραφή</th>
+ <th class="dt-path">Διαδρομή</th>
+ <th class="dt-type">Media-Type</th>
+ <th class="dt-privilege">Πρόσβαση</th>
+ <th class="dt-actions"></th>
+ </thead>
+ </table>
+
+ </div>
+
+
+ </div>
+ </div>
+</div><!-- /manage -->
+
+
+
+<!-- MODAL for new/edit category -->
+<!-- NOTE: tabindex="-1" removed, ref:https://github.com/select2/select2-bootstrap-theme/issues/41 -->
+<div class="modal fade" id="manageFiles" aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-dialog modal-lg" role="document">
+ <div class="modal-content">
+
+ <form method="post" action="">
+
+ <div class="modal-header">
+ <h4 class="modal-title" id="myModalLabel">Πρόσβαση αρχείου</h4>
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
+ </div><!-- /modal-header -->
+
+ <!-- modal-body -->
+ <div class="modal-body">
+
+ <!-- form fields -->
+
+ <div class="row form-group">
+ <label class="control-label col-sm-12" for="label">Κατηγορία Επιπέδου Πρόσβασης</label>
+ <div class="col-sm-12">
+ <input class="form-control form-control-sm" type="text" name="label" value="" required="">
+ </div>
+ </div>
+
+ <div class="row form-group">
+ <label class="control-label col-sm-12" for="included_id">Κατηγορία Επιπέδου Πρόσβασης</label>
+ <div class="col-sm-12">
+ <select class="form-control form-control-sm form-select form-select-sm" id="privilege_id" name="privilege_id" required></select>
+ </div>
+ </div>
+
+ <div class="row form-group">
+ <input type="hidden" name="id" value="0"><!-- action = (0) ? 'new' : 'edit' -->
+ </div>
+
+
+ </div><!-- /modal body -->
+
+ <div class="modal-footer">
+ <div class="row form-actions">
+
+ <div class="col">
+ <button type="button" class="btn btn-default js-modal-close col-sm-12" data-bs-dismiss="modal">Κλείσιμο</button>
+ </div>
+ <div class="col">
+ <button class="btn btn-success col-sm-12" type="submit">Καταχώριση</button>
+ </div>
+
+ </div>
+ </div><!-- /modal-footer -->
+
+ </form><!-- /form -->
+
+ </div>
+ </div>
+</div>
diff --git a/public/app/views/admin/lessons.php b/public/app/views/admin/lessons.php
new file mode 100644
index 0000000..d1cd3ae
--- /dev/null
+++ b/public/app/views/admin/lessons.php
@@ -0,0 +1,126 @@
+ <!-- title bar -->
+ <div class="title-bar">
+ <div><h5>Διαχείριση Μαθημάτων</h5></div>
+ <div>
+ <!-- Button trigger modal -->
+ <a type="button" class="btn pull-right" href="/admin/edit_lesson">
+ <i class="fas fa-plus"></i> &nbsp; Νέο Μάθημα
+ </a>
+ </div>
+</div>
+
+<div class="manage">
+ <div class="row">
+ <div class="col-md-12">
+
+ <div id="lessons">
+
+ <table id="dt-lessons" class="table table-responsive dt-table" style="width:100%">
+ <thead>
+ <th class="dt-id">α/α</th>
+ <th class="dt-title">Τίτλος</th>
+ <th class="dt-course">Κεφάλαιο</th>
+ <th class="dt-privileges">Πρόσβαση</th>
+ <th class="dt-actions"></th>
+ </thead>
+ </table>
+
+ </div>
+
+ </div>
+ </div>
+</div><!-- /manage -->
+
+
+
+<!-- MODAL for new/edit category -->
+<!-- NOTE: tabindex="-1" removed, ref:https://github.com/select2/select2-bootstrap-theme/issues/41 -->
+<div class="modal fade" id="manageLessons" aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-dialog modal-lg" role="document">
+ <div class="modal-content">
+
+ <form method="post" action="">
+
+ <div class="modal-header">
+ <h4 class="modal-title" id="myModalLabel">Παράμετροι Μαθήματος</h4>
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
+ </div><!-- /modal-header -->
+
+ <!-- modal-body -->
+ <div class="modal-body">
+
+ <!-- form fields -->
+
+ <div class="row form-group">
+ <label class="control-label col-sm-12" for="label">Τίτλος</label>
+ <div class="col-sm-12">
+ <input class="form-control form-control-sm" type="text" name="title" value="" required="">
+ </div>
+ </div>
+
+ <div class="row form-group">
+ <label class="control-label col-sm-12" for="course_id">Κεφάλαιο</label>
+ <div class="col-sm-12">
+ <select class="form-control form-control-sm form-select form-select-sm" id="course_id" name="course_id" required></select>
+ </div>
+ </div>
+
+ <!-- one line, two fields (privilege, status) -->
+ <div class="row">
+ <div class="col-md-8">
+
+ <!-- privilege level -->
+ <div class="row form-group">
+ <label class="control-label col-sm-12" for="privilege_id">Επίπεδο Πρόσβασης</label>
+ <div class="col-sm-12">
+ <select class="form-control form-control-sm form-select form-select-sm" id="privilege_id" name="privilege_id">
+ </select>
+ </div>
+ </div>
+
+ </div>
+ <div class="col-md-4">
+
+ <!-- status: published|unpublished -->
+ <div class="row form-group">
+ <label class="control-label col-sm-12" for="status">Κατάσταση</label>
+ <div class="col-sm-12">
+ <select class="form-control form-control-sm form-select form-select-sm" name="status" onchange="this.dataset.chosen = this.value;">
+ <option value="0">Αδημοσίευτο</option>
+ <option value="one">ΔΗΜΟΣΙΕΥΜΕΝΟ</option>
+ </select>
+ </div>
+ </div>
+
+
+ </div>
+ </div>
+
+
+
+
+ <div class="row form-group">
+ <input type="hidden" name="id" value="0"><!-- lesson-id -->
+ </div>
+
+
+ </div><!-- /modal body -->
+
+ <div class="modal-footer">
+ <div class="row" style="width: 50%;">
+ <div class="form-actions">
+ <div class="col-4">
+ <button type="button" class="btn btn-default js-modal-close col-sm-12" data-bs-dismiss="modal">Κλείσιμο</button>
+ </div>
+ <div class="col-8">
+ <button class="btn btn-success col-sm-12" type="submit">Καταχώριση</button>
+ </div>
+ </div>
+ </div>
+ </div><!-- /modal-footer -->
+
+ </form><!-- /form -->
+
+ </div>
+ </div>
+</div>
diff --git a/public/app/views/admin/pages.php b/public/app/views/admin/pages.php
new file mode 100644
index 0000000..dd8f954
--- /dev/null
+++ b/public/app/views/admin/pages.php
@@ -0,0 +1,109 @@
+ <!-- title bar -->
+ <div class="title-bar">
+ <div><h5>Διαχείριση Μαθημάτων</h5></div>
+ <div>
+ <!-- Button trigger modal -->
+ <a type="button" class="btn pull-right" href="/admin/edit_page">
+ <i class="fas fa-plus"></i> &nbsp; Νέα Σελίδα
+ </a>
+ </div>
+</div>
+
+<div class="manage">
+ <div class="row">
+ <div class="col-md-12">
+
+ <div id="pages">
+
+ <table id="dt-pages" class="table table-responsive dt-table" style="width:100%">
+ <thead>
+ <th class="dt-id">α/α</th>
+ <th class="dt-title">Τίτλος</th>
+ <th class="dt-actions"></th>
+ </thead>
+ </table>
+
+ </div>
+
+ </div>
+ </div>
+</div><!-- /manage -->
+
+
+
+<!-- MODAL for new/edit category -->
+<!-- NOTE: tabindex="-1" removed, ref:https://github.com/select2/select2-bootstrap-theme/issues/41 -->
+<div class="modal fade" id="managePages" aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-dialog modal-lg" role="document">
+ <div class="modal-content">
+
+ <form method="post" action="">
+
+ <div class="modal-header">
+ <h4 class="modal-title" id="myModalLabel">Παράμετροι Μαθήματος</h4>
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
+ </div><!-- /modal-header -->
+
+ <!-- modal-body -->
+ <div class="modal-body">
+
+ <!-- form fields -->
+
+ <div class="row form-group">
+ <label class="control-label col-sm-12" for="label">Τίτλος</label>
+ <div class="col-sm-12">
+ <input class="form-control form-control-sm" type="text" name="title" value="" required="">
+ </div>
+ </div>
+
+
+ <!-- one line / two parts; status: pull right -->
+ <div class="row">
+ <div class="col-md-8">
+ &nbsp<!-- nothing -->
+ </div>
+ <div class="col-md-4">
+
+ <!-- status: published|unpublished -->
+ <div class="row form-group">
+ <label class="control-label col-sm-12" for="status">Κατάσταση</label>
+ <div class="col-sm-12">
+ <select class="form-control form-control-sm form-select form-select-sm" name="status" onchange="this.dataset.chosen = this.value;">
+ <option value="0">Αδημοσίευτο</option>
+ <option value="one">ΔΗΜΟΣΙΕΥΜΕΝΟ</option>
+ </select>
+ </div>
+ </div>
+
+
+ </div>
+ </div>
+
+
+
+
+ <div class="row form-group">
+ <input type="hidden" name="id" value="0"><!-- page-id -->
+ </div>
+
+
+ </div><!-- /modal body -->
+
+ <div class="modal-footer">
+ <div class="row" style="width: 50%;">
+ <div class="form-actions">
+ <div class="col-4">
+ <button type="button" class="btn btn-default js-modal-close col-sm-12" data-bs-dismiss="modal">Κλείσιμο</button>
+ </div>
+ <div class="col-8">
+ <button class="btn btn-success col-sm-12" type="submit">Καταχώριση</button>
+ </div>
+ </div>
+ </div>
+ </div><!-- /modal-footer -->
+
+ </form><!-- /form -->
+
+ </div>
+ </div>
+</div>
diff --git a/public/app/views/admin/panel.php b/public/app/views/admin/panel.php
new file mode 100644
index 0000000..59b8cba
--- /dev/null
+++ b/public/app/views/admin/panel.php
@@ -0,0 +1,4 @@
+<br/>
+<br/>
+<br/>
+<h4>Admin panel</h4> \ No newline at end of file
diff --git a/public/app/views/admin/privileges.php b/public/app/views/admin/privileges.php
new file mode 100644
index 0000000..587c363
--- /dev/null
+++ b/public/app/views/admin/privileges.php
@@ -0,0 +1,93 @@
+ <!-- title bar -->
+ <div class="title-bar">
+ <div><h5>Διαχείριση Επιπέδων Πρόσβασης</h5></div>
+ <div>
+ <!-- Button trigger modal -->
+ <button type="button" class="btn pull-right"
+ data-bs-toggle="modal" data-bs-target="#managePrivileges" data-id="0">
+ <i class="fas fa-plus"></i> &nbsp; Νέο Επίπεδο
+ </button>
+ </div>
+</div>
+
+<div class="manage">
+ <div class="row">
+ <div class="col-md-12">
+
+ <div id="categories-tree">
+
+ <table id="dt-privileges" class="table table-responsive dt-table" style="width:100%">
+ <thead>
+ <th class="dt-id">Κωδικός</th>
+ <th class="dt-privilege">Επίπεδο Πρόσβασης</th>
+ <th class="dt-includes">Περιλαμβάνει</th>
+ <th class="dt-actions"></th>
+ </thead>
+ </table>
+
+ </div>
+
+
+ </div>
+ </div>
+</div><!-- /manage -->
+
+
+
+<!-- MODAL for new/edit category -->
+<!-- NOTE: tabindex="-1" removed, ref:https://github.com/select2/select2-bootstrap-theme/issues/41 -->
+<div class="modal fade" id="managePrivileges" aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-dialog modal-lg" role="document">
+ <div class="modal-content">
+
+ <form method="post" action="">
+
+ <div class="modal-header">
+ <h4 class="modal-title" id="myModalLabel">Modal title</h4>
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
+ </div><!-- /modal-header -->
+
+ <!-- modal-body -->
+ <div class="modal-body">
+
+ <!-- form fields -->
+
+ <div class="row form-group">
+ <label class="control-label col-sm-12" for="label">Όνομα Επιπέδου Πρόσβασης</label>
+ <div class="col-sm-12">
+ <input class="form-control form-control-sm" type="text" name="label" value="" required="">
+ </div>
+ </div>
+
+ <div class="row form-group">
+ <label class="control-label col-sm-12" for="included_id">Περιλαμβάνει μέχρι και το Επίπεδο</label>
+ <div class="col-sm-12">
+ <select class="form-control form-control-sm form-select form-select-sm" id="included_id" name="included_id" required></select>
+ </div>
+ </div>
+
+ <div class="row form-group">
+ <input type="hidden" name="id" value="0"><!-- action = (0) ? 'new' : 'edit' -->
+ </div>
+
+
+ </div><!-- /modal body -->
+
+ <div class="modal-footer">
+ <div class="row form-actions">
+
+ <div class="col">
+ <button type="button" class="btn btn-default js-modal-close col-sm-12" data-bs-dismiss="modal">Κλείσιμο</button>
+ </div>
+ <div class="col">
+ <button class="btn btn-success col-sm-12" type="submit">Καταχώριση</button>
+ </div>
+
+ </div>
+ </div><!-- /modal-footer -->
+
+ </form><!-- /form -->
+
+ </div>
+ </div>
+</div>
diff --git a/public/app/views/admin/skeleton.php b/public/app/views/admin/skeleton.php
new file mode 100644
index 0000000..927bd2d
--- /dev/null
+++ b/public/app/views/admin/skeleton.php
@@ -0,0 +1,45 @@
+<?php ob_start(); ?><!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>Classroom - <?=$title?></title>
+
+ <?php // header includes
+ ////////////////////////////////////////////////////////////////////////
+ Render::view('components/header_includes', ////////////////////////////
+ ['administration' => true]
+ );
+ ?>
+
+
+</head>
+<body>
+
+ <div class="classroom admin-container">
+
+ <?php
+ // 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>
+</html><?php ob_flush(); ?>