Move stuff around
This commit is contained in:
parent
f96a2cac05
commit
23cf6313ed
@ -23,7 +23,7 @@ class AccessControl
|
||||
// routes that need power level 1 and up
|
||||
[
|
||||
"routes" => [
|
||||
"teamtable/edit/"
|
||||
"race/"
|
||||
],
|
||||
"catcher" => [
|
||||
"name" => "page",
|
||||
|
@ -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; ?>
|
||||
|
@ -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');
|
@ -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();
|
||||
}
|
9
public/race/teamtable/edit/index.php
Normal file
9
public/race/teamtable/edit/index.php
Normal 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');
|
@ -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
|
||||
]);
|
4
public/race/teamtable/index.php
Normal file
4
public/race/teamtable/index.php
Normal file
@ -0,0 +1,4 @@
|
||||
<?php $app = require '../../../app/inc.php';
|
||||
|
||||
// redirect
|
||||
$app->redirect('edit/');
|
@ -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');
|
@ -1,4 +0,0 @@
|
||||
<?php $app = require '../../app/inc.php';
|
||||
|
||||
// redirect
|
||||
$app->redirect('edit/');
|
Reference in New Issue
Block a user