diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2023-01-20 20:22:06 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2023-01-20 20:22:06 +0100 |
commit | 277fedffc624f55c6ecc8bd80ed8db370134e47e (patch) | |
tree | ac22560f978c3789a63c80284fbd314e11d0b396 /includes/admin/views/giglog_admin_page.php | |
parent | f499d9e657fe79e4413eec9e20ae13d616fac6f5 (diff) | |
download | gigologadmin-277fedffc624f55c6ecc8bd80ed8db370134e47e.tar.gz gigologadmin-277fedffc624f55c6ecc8bd80ed8db370134e47e.tar.bz2 gigologadmin-277fedffc624f55c6ecc8bd80ed8db370134e47e.zip |
Rename and reorganize more source files.
Diffstat (limited to 'includes/admin/views/giglog_admin_page.php')
-rw-r--r-- | includes/admin/views/giglog_admin_page.php | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/includes/admin/views/giglog_admin_page.php b/includes/admin/views/giglog_admin_page.php deleted file mode 100644 index acd0172..0000000 --- a/includes/admin/views/giglog_admin_page.php +++ /dev/null @@ -1,91 +0,0 @@ -<?php - -// SPDX-FileCopyrightText: 2021 Andrea Chirulescu <andrea.chirulescu@gmail.com> -// SPDX-FileCopyrightText: 2021 Harald Eilertsen <haraldei@anduin.net> -// -// SPDX-License-Identifier: AGPL-3.0-or-later - -if ( ! class_exists( 'GiglogAdmin_AdminPage' ) ) { - require_once __DIR__ . '/../../class-giglogadmin-venue.php'; - require_once __DIR__ . '/_concerts_table.php'; - require_once __DIR__ . '/_edit_concert_form.php'; - require_once __DIR__ . '/_new_venue_form.php'; - - class GiglogAdmin_AdminPage { - - const STATUS_LABELS = array( - '', - 'Accred Requested', - 'Photo Approved', - 'Text Approved', - 'Photo and Text Approved', - 'Rejected', - ); - - public static function render_html() : void { - $page = new self(); - $page->render_page(); - } - - private function render_page() : void { - $concerts = new GiglogAdmin_ConcertsTable(); - ?> - <div class="wrap"> - <h1>Giglog Admin</h1> - - <p>The available slots are marked with the green checkbox. - If you click on it, it will be assigned to you and if you no longer - wish to cover that concert, click on the red icon and you will be - unassigned. A mail should be sent to the admin when this happens, - but in order for the accreditation request to be sent, you have to - mail live@eternal-terror.com with the template containing concert - information. There might be some exceptions, but those are discussed - case by case. So whenever you want a concert, assign yourself and send - the template no later than 3 weeks before the concert.</p> - - <p>Admin will try to keep the concert status updated so that you know - what the accreditation status is. You will get personal message if this - is really close to the concert date.</p> - - <p><?php echo $concerts->render(); ?></p> - </div> - <?php - if ( current_user_can( 'administrator' ) ) { - $edit_form = new GiglogAdmin_EditConcertForm(); - $venue_form = new GiglogAdmin_NewVenueForm(); - ?> - <div> - <h3>Form to create/edit concerts and venues</h3> - </div> - <div class="editform"> - <?php echo $edit_form->render() . $venue_form->render(); ?> - </div> - <?php - } - } - - /** - * @return void - */ - static function update() : void { - if ( 'POST' !== $_SERVER['REQUEST_METHOD'] ) { - return; - } - - if ( isset( $_POST['assignitem'] ) || isset( $_POST['unassignitem'] ) || isset( $_POST['selectstatus'] ) ) { - GiglogAdmin_ConcertsTable::update(); - return; - } - - if ( isset( $_POST['newconcert'] ) || isset( $_POST['editconcert'] ) ) { - GiglogAdmin_EditConcertForm::update(); - return; - } - - if ( isset( $_POST['newvenue'] ) ) { - GiglogAdmin_NewVenueForm::update(); - return; - } - } - } -} |