diff options
| author | Geo Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-06-06 18:34:51 +0300 |
|---|---|---|
| committer | Geo Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-06-06 18:34:51 +0300 |
| commit | b6fea434ad2888de8dbc87d25ba0444c991d42d6 (patch) | |
| tree | 55ff4ea770c3c8da834ea37bb5a50cf53e72381a /public/app | |
| parent | 1388a64651f1c61a6aafc32f8e3e60f7a6ffd339 (diff) | |
| download | gyraf1gov-b6fea434ad2888de8dbc87d25ba0444c991d42d6.tar.gz gyraf1gov-b6fea434ad2888de8dbc87d25ba0444c991d42d6.tar.bz2 gyraf1gov-b6fea434ad2888de8dbc87d25ba0444c991d42d6.zip | |
send invitation(s) form is ready
Diffstat (limited to 'public/app')
| -rw-r--r-- | public/app/config/setup_application.php | 17 | ||||
| -rw-r--r-- | public/app/controllers/Office.php | 9 | ||||
| -rw-r--r-- | public/app/routes/user.php | 7 | ||||
| -rw-r--r-- | public/app/views/components/own_petitions.php | 2 | ||||
| -rw-r--r-- | public/app/views/templates/invite.php | 133 | ||||
| -rw-r--r-- | public/app/views/user/panel.php | 55 | ||||
| -rw-r--r-- | public/app/views/xx--admin/admin-menu.php | 47 | ||||
| -rw-r--r-- | public/app/views/xx--admin/categories.php | 91 | ||||
| -rw-r--r-- | public/app/views/xx--admin/edit_lesson.php | 159 | ||||
| -rw-r--r-- | public/app/views/xx--admin/edit_page.php | 139 | ||||
| -rw-r--r-- | public/app/views/xx--admin/files.php | 96 | ||||
| -rw-r--r-- | public/app/views/xx--admin/lessons.php | 126 | ||||
| -rw-r--r-- | public/app/views/xx--admin/pages.php | 109 | ||||
| -rw-r--r-- | public/app/views/xx--admin/panel.php | 4 | ||||
| -rw-r--r-- | public/app/views/xx--admin/privileges.php | 93 | ||||
| -rw-r--r-- | public/app/views/xx--admin/skeleton.php | 45 |
16 files changed, 154 insertions, 978 deletions
diff --git a/public/app/config/setup_application.php b/public/app/config/setup_application.php index 2c8b756..45c6712 100644 --- a/public/app/config/setup_application.php +++ b/public/app/config/setup_application.php @@ -206,9 +206,13 @@ define('GENDERED_ARTICLE',[ // gendered (grammar) articles +## ----------------------------------------------------------------------------- +## +## t h e f o r m s +## +## ----------------------------------------------------------------------------- + -// the forms /////////////////////////////////////////////////////////////////// -// ----------------------------------------------------------------------------- // registration/activation form (from invitation) // --- @@ -295,7 +299,8 @@ define('REGISTRATION_FORM', [ ]); - +// (edit) user properties +// --- define('USER_PROPERTIES_FORM', [ 'defaults' => [ 'outer_class' => 'col-12', @@ -365,7 +370,8 @@ define('USER_PROPERTIES_FORM', [ ]); - +// (re-)set password +// --- define('SET_PASSWORD_FORM', [ 'defaults' => [ 'outer_class' => 'col-12', @@ -395,6 +401,7 @@ define('SET_PASSWORD_FORM', [ ] ]); + // Application (common request) form // --- define('APPLICATION_FORM', [ @@ -488,9 +495,9 @@ define('APPLICATION_FORM', [ ] ]); + // penalty form // --- - define('PENALTY_FORM', [ 'defaults' => [ 'outer_class' => 'col-12', diff --git a/public/app/controllers/Office.php b/public/app/controllers/Office.php index c67249a..7a542eb 100644 --- a/public/app/controllers/Office.php +++ b/public/app/controllers/Office.php @@ -23,7 +23,6 @@ class Office { ## PERMITION ## ------------------------------------------------------------------------- - /** is admin or permited * * shortcut method for checking access authorization @@ -52,7 +51,6 @@ class Office { ## SERVE FILE ## ------------------------------------------------------------------------- - /** serve file by file_path * (request is valid only for admin users) * @@ -116,7 +114,6 @@ class Office { ## secretarial support / serve forms for teachers' requests and applications ## ------------------------------------------------------------------------- - /** request any (empty/new) petition form * * The method acts as an authorization checker and internal router @@ -268,7 +265,6 @@ class Office { ## handle submits of forms ## ------------------------------------------------------------------------- - /** add_petition * * handle an add petition request (petition form is submited) @@ -309,7 +305,6 @@ class Office { ## LIST PETITIONS ## ------------------------------------------------------------------------- - public static function user_petitions() { $manager = new App_manager(); // use APP Manager @@ -326,7 +321,6 @@ class Office { } - public static function all_petitions() { if (Auth::in_admin_group()) { @@ -338,7 +332,6 @@ class Office { } - public static function petition_copy($sign) { if (Auth::in_admin_group()) { @@ -359,6 +352,7 @@ class Office { + ## TICKET METHODS (create, remove) ## tickets eliminate CSRF attacks ## ------------------------------------------------------------------------- @@ -415,7 +409,6 @@ class Office { - ## ADMIN METHODS (insert, updated etc.) ## ------------------------------------------------------------------------- diff --git a/public/app/routes/user.php b/public/app/routes/user.php index e43eaa9..67032e6 100644 --- a/public/app/routes/user.php +++ b/public/app/routes/user.php @@ -187,10 +187,15 @@ if (Auth::in_admin_group()) { Office::set_protocol(); }, 'post'); + // invite user(s) // --- -- -- - - - Route::add('/admin/invite', function() { - Render::view('admin/invite'); + $teachers = Registry::use('database')->runQuery( + "SELECT id, concat(last_name, ' ', first_name) as TeacherName + FROM user ORDER BY TeacherName", [] + ); + Render::view('templates/invite', ['teachers' => $teachers]); }); } diff --git a/public/app/views/components/own_petitions.php b/public/app/views/components/own_petitions.php index 41e59b4..c4f84fe 100644 --- a/public/app/views/components/own_petitions.php +++ b/public/app/views/components/own_petitions.php @@ -2,7 +2,7 @@ <!-- title bar --> <div class="title-bar"> <div class="row"> - <h5 class="col-md-10">Διαχείριση Αιτήσεων και Δοικητικών Εγγράφων</h5> + <h4 class="col-md-10">Διαχείριση Αιτήσεων και Δοικητικών Εγγράφων</h4> <div class="col-md-2"> <a type="button" class="btn btn-sm btn-back2panel pull-right" href="/panel"> Επιστροφή diff --git a/public/app/views/templates/invite.php b/public/app/views/templates/invite.php new file mode 100644 index 0000000..637697f --- /dev/null +++ b/public/app/views/templates/invite.php @@ -0,0 +1,133 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title><?=SITE_TITLE?> - Είσοδος Χρήστη</title> + + <?php // header includes + //////////////////////////////////////////////////////////////////////// + Render::view('components/header_includes'); + ?> +<style> +:root { /* login-form overides */ + --form-content-font-size: 1rem; + --form-input-height: 34px; + --select2-arrow-top: 1px; +} +</style> +</head> +<body class="office central-form"> + + <div class='container'> + <div class='content max420px'> + + + <div class="content-form"> + <h4> + Αποστολή προσκλήσεων + <span> + <a type="button" class="btn btn-sm btn-back2panel pull-right" href="/panel"> + Επιστροφή + </a> + </span> + </h4> + <hr /> + + <form method="post"> + + <div class='row'> + <div class='form-group '> + <label for='members'>Μέλη *</label> + + <select id='members' class='form-select form-select-sm' name='members[]' multiple='multiple' style='width:100%'> + <?php foreach($teachers as $key => $item) :?> + <option value="<?=$item['id']?>"><?=$item['TeacherName']?></option> + <?php endforeach; ?> + </select> + </div> + </div> + + + <br /> + + <div class="row justify-content-center"> + <div class="col-6"> + <button type="submit" class="btn btn-primary btn-sm col-12">Σύνδεση</button> + </div> + </div> + + </form> + </div> + + <div class="info"> + <!-- + <p>Αν ξεχάσατε τον κωδικό πρόσβασης μπορείτε να δημιουργήσετε ένα νέο (υπο κατασκευή).</p> + --> + <p> + Εαν δικαιούστε αλλά δεν έχετε πρόσβαση στο site, παρακαλούμε επικοινωνήστε + με τη διεύθυνση του σχολείου προκειμένου να σας αποσταλεί σχετική πρόσκληση. + </p> + <p> + Ο ιστότοπος χρησιμοποιεί cookies τα οποία έχουν αποκλειστικά λειτουργικό ρόλο. + Η χρήση των υπηρεσιών του site συνεπάγεται την αποδοχή διατήρησης αυτών των cookies. + </p> + </div> + + </div> + </div> + +</body> + +<?php // include select2 supplementary functions + //////////////////////////////////////////////////////////////////////////// + Render::view('js/select2-supplementary'); +?> + +<script> + +$(document).ready(function() { + + // initialize select2 control + var members = $('#members'); + members.select2({ width: '100%' }); + members.val(null).trigger('change'); + + + // When form is submited + // ------------------------------------------------------------------------- + + $('.content form').submit( event => { + event.preventDefault(); + + + // prepare data to POST + var data = { + email: $('input[name=email]').val(), + password: $('input[name=password]').val() + }; + + // select action url (add or update) + var request = '/account/check-login'; + + // send POST request + $.post(request, data) + .done(function( data ) { + if (data.status !== false) { + window.location.href = data.status.goto; + + } else { + alert('Τα στοιχεία πρόσβασης που δώσατε είναι λάθος. Παρακαλώ προσπαθήστε ξανά.'); + } + }); + + + }); + +}); +</script> + +<?php // credits + ////////////////////////////////////////////////////////////////////////////// + Render::view('js/credits'); +?> +</html> diff --git a/public/app/views/user/panel.php b/public/app/views/user/panel.php index 9ac7908..304237b 100644 --- a/public/app/views/user/panel.php +++ b/public/app/views/user/panel.php @@ -43,60 +43,7 @@ </div> </div> - -<?php if (($is_admin) && ($content == 'admin_petitions')) : ?> - - <!-- MODAL for set protocol number --> - <div class="modal fade" id="managePetition" 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"> - - <div class="row form-group"> - <label class="control-label col-sm-12" for="protocol">Τίτλος</label> - <div class="col-sm-12"> - <input class="form-control form-control-sm" type="text" name="protocol" value="" required=""> - </div> - </div> - - <div class="row form-group"><!-- hiddens --> - <input type="hidden" name="id" value="0"><!-- petition-id --> - <input type="hidden" name="signature" value=""><!-- signature --> - </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> - -<?php endif; ?> - - </body> +</body> <script src="/assets/js/panel/<?=$content?>.js"></script> diff --git a/public/app/views/xx--admin/admin-menu.php b/public/app/views/xx--admin/admin-menu.php deleted file mode 100644 index 52e8522..0000000 --- a/public/app/views/xx--admin/admin-menu.php +++ /dev/null @@ -1,47 +0,0 @@ -<?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/xx--admin/categories.php b/public/app/views/xx--admin/categories.php deleted file mode 100644 index 26fd5a2..0000000 --- a/public/app/views/xx--admin/categories.php +++ /dev/null @@ -1,91 +0,0 @@ - <!-- 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> Νέο Κεφάλαιο - </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/xx--admin/edit_lesson.php b/public/app/views/xx--admin/edit_lesson.php deleted file mode 100644 index ef875b4..0000000 --- a/public/app/views/xx--admin/edit_lesson.php +++ /dev/null @@ -1,159 +0,0 @@ -<?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> Προεπισκόπηση - </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> Προσθήκη - </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/xx--admin/edit_page.php b/public/app/views/xx--admin/edit_page.php deleted file mode 100644 index 46c47bc..0000000 --- a/public/app/views/xx--admin/edit_page.php +++ /dev/null @@ -1,139 +0,0 @@ -<?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> Προεπισκόπηση - </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> Προσθήκη - </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/xx--admin/files.php b/public/app/views/xx--admin/files.php deleted file mode 100644 index c6d2771..0000000 --- a/public/app/views/xx--admin/files.php +++ /dev/null @@ -1,96 +0,0 @@ - <!-- 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> Νέο Επίπεδο - </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/xx--admin/lessons.php b/public/app/views/xx--admin/lessons.php deleted file mode 100644 index d1cd3ae..0000000 --- a/public/app/views/xx--admin/lessons.php +++ /dev/null @@ -1,126 +0,0 @@ - <!-- 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> Νέο Μάθημα - </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/xx--admin/pages.php b/public/app/views/xx--admin/pages.php deleted file mode 100644 index dd8f954..0000000 --- a/public/app/views/xx--admin/pages.php +++ /dev/null @@ -1,109 +0,0 @@ - <!-- 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> Νέα Σελίδα - </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"> -  <!-- 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/xx--admin/panel.php b/public/app/views/xx--admin/panel.php deleted file mode 100644 index 59b8cba..0000000 --- a/public/app/views/xx--admin/panel.php +++ /dev/null @@ -1,4 +0,0 @@ -<br/> -<br/> -<br/> -<h4>Admin panel</h4>
\ No newline at end of file diff --git a/public/app/views/xx--admin/privileges.php b/public/app/views/xx--admin/privileges.php deleted file mode 100644 index 587c363..0000000 --- a/public/app/views/xx--admin/privileges.php +++ /dev/null @@ -1,93 +0,0 @@ - <!-- 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> Νέο Επίπεδο - </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/xx--admin/skeleton.php b/public/app/views/xx--admin/skeleton.php deleted file mode 100644 index 927bd2d..0000000 --- a/public/app/views/xx--admin/skeleton.php +++ /dev/null @@ -1,45 +0,0 @@ -<?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(); ?> |
