Move stuff around

This commit is contained in:
William 2022-03-15 18:20:50 +01:00
parent f96a2cac05
commit 23cf6313ed
13 changed files with 23 additions and 23 deletions

View File

@ -23,7 +23,7 @@ class AccessControl
// routes that need power level 1 and up
[
"routes" => [
"teamtable/edit/"
"race/"
],
"catcher" => [
"name" => "page",

View File

@ -44,8 +44,8 @@
<?php if ($this->user->powerLevel > 0): ?>
<h4>Tillatelser</h4>
<ul>
<li><a href="<?=$this->config['root_url']?>simulator.php">Simulator</a></li>
<li><a href="<?=$this->config['root_url']?>teamtable/edit/index.php">Endre lagene</a></li>
<li><a href="<?=$this->config['root_url']?>race/simulator.php">Simulator</a></li>
<li><a href="<?=$this->config['root_url']?>race/teamtable/edit/index.php">Endre lagene</a></li>
</ul>
<?php endif; ?>
<?php endif; ?>

View File

@ -1,4 +1,4 @@
<?php $app = require '../app/inc.php';
<?php $app = require '../../app/inc.php';
// TODO: refactor
@ -44,5 +44,5 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST')
}
$app->view('template/header', ['title' => 'Simulator']);
$app->view('pages/simulator');
$app->view('pages/race/simulator');
$app->view('template/footer');

View File

@ -1,4 +1,4 @@
<?php $app = require '../../../app/inc.php';
<?php $app = require '../../../../app/inc.php';
use App\Teamtable\Team;
@ -26,7 +26,7 @@ if (!$team)
if ($confirm)
{
$app->view('template/header', ['title' => 'Bekreft sletting']);
$app->view('pages/teamtable/edit/delete', ['team' => $team]);
$app->view('pages/race/teamtable/edit/delete', ['team' => $team]);
$app->view('template/footer');
die();
}

View File

@ -0,0 +1,9 @@
<?php $app = require '../../../../app/inc.php';
$model = $app->model('Teamtable');
$teams = $model->getAll();
$app->view('template/header', ['title' => 'Endre lagtabell']);
$app->view('pages/race/teamtable/edit/index', ["teams" => $teams]);
$app->view('template/footer');

View File

@ -1,4 +1,4 @@
<?php $app = require '../../../app/inc.php';
<?php $app = require '../../../../app/inc.php';
/**
* Creates and updates team in teamtable
*/
@ -66,7 +66,7 @@ if ($item !== NULL)
$app->view('template/header', [
'title' => $title
]);
$app->view('pages/teamtable/edit/update', [
$app->view('pages/race/teamtable/edit/update', [
"team" => $team,
"title" => $title
]);
@ -79,7 +79,7 @@ $title = "Legg til lag";
$app->view('template/header', [
'title' => $title
]);
$app->view('pages/teamtable/edit/update', [
$app->view('pages/race/teamtable/edit/update', [
"team" => new Team,
"title" => $title
]);

View File

@ -0,0 +1,4 @@
<?php $app = require '../../../app/inc.php';
// redirect
$app->redirect('edit/');

View File

@ -1,9 +0,0 @@
<?php $app = require '../../../app/inc.php';
$model = $app->model('Teamtable');
$teams = $model->getAll();
$app->view('template/header', ['title' => 'Endre lagtabell']);
$app->view('pages/teamtable/edit/index', ["teams" => $teams]);
$app->view('template/footer');

View File

@ -1,4 +0,0 @@
<?php $app = require '../../app/inc.php';
// redirect
$app->redirect('edit/');