Realschule
This commit is contained in:
@@ -43,6 +43,12 @@ class AppController extends Controller
|
|||||||
|
|
||||||
$this->loadComponent('RequestHandler');
|
$this->loadComponent('RequestHandler');
|
||||||
$this->loadComponent('Flash');
|
$this->loadComponent('Flash');
|
||||||
|
|
||||||
|
$session = $this->request->session();
|
||||||
|
|
||||||
|
if(!($session->check('SchoolType'))) {
|
||||||
|
$session->write('SchoolType','02');
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Enable the following components for recommended CakePHP security settings.
|
* Enable the following components for recommended CakePHP security settings.
|
||||||
|
|||||||
@@ -13,7 +13,20 @@ use AsdCurl\AsdUp;
|
|||||||
*/
|
*/
|
||||||
class BudgetController extends AppController
|
class BudgetController extends AppController
|
||||||
{
|
{
|
||||||
|
public function changeSchool()
|
||||||
|
{
|
||||||
|
$session = $this->request->session();
|
||||||
|
if ($session->read('SchoolType') == '02') {
|
||||||
|
$session->write('SchoolType','04');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$session->write('SchoolType','02');
|
||||||
|
}
|
||||||
|
$this->redirect($this->referer());
|
||||||
|
}
|
||||||
|
|
||||||
public function listBudgets() {
|
public function listBudgets() {
|
||||||
|
|
||||||
$wlBudgets = $this->Budget->wlBudgets->find('all', [
|
$wlBudgets = $this->Budget->wlBudgets->find('all', [
|
||||||
'conditions' => array('schulart' => 'GY')
|
'conditions' => array('schulart' => 'GY')
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ $cakeDescription = 'CakePHP: the rapid development php framework';
|
|||||||
|
|
||||||
<?= $this->Html->css('base.css') ?>
|
<?= $this->Html->css('base.css') ?>
|
||||||
<?= $this->Html->css('cake.css') ?>
|
<?= $this->Html->css('cake.css') ?>
|
||||||
|
<?= $this->Html->css('budget-costum.css') ?>
|
||||||
<?= $this->Html->css('handsontable.min.css') ?>
|
<?= $this->Html->css('handsontable.min.css') ?>
|
||||||
<?= $this->Html->css('handsontable.costum.css') ?>
|
<?= $this->Html->css('handsontable.costum.css') ?>
|
||||||
|
|
||||||
@@ -42,13 +43,22 @@ $cakeDescription = 'CakePHP: the rapid development php framework';
|
|||||||
<nav class="top-bar expanded" data-topbar role="navigation">
|
<nav class="top-bar expanded" data-topbar role="navigation">
|
||||||
<ul class="title-area large-3 medium-4 columns">
|
<ul class="title-area large-3 medium-4 columns">
|
||||||
<li class="name">
|
<li class="name">
|
||||||
<h1><a href=""><?= $this->fetch('title') ?></a></h1>
|
<?php
|
||||||
|
$session = $this->request->session();
|
||||||
|
if ($session->read('SchoolType') == '02') {
|
||||||
|
echo '<h1>Realschule</h1>';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo '<h1>Gymnasium</h1>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="top-bar-section">
|
<div class="top-bar-section">
|
||||||
<ul class="right">
|
<ul class="right">
|
||||||
<li><a target="_blank" href="https://book.cakephp.org/3.0/">Documentation</a></li>
|
<li><?php echo $this->Html->link('Overview',array('controller' => 'budget', 'action' => 'overview')); ?></li>
|
||||||
<li><a target="_blank" href="https://api.cakephp.org/3.0/">API</a></li>
|
<li><?php echo $this->Html->link('Budgetart wählen',array('controller' => 'budget', 'action' => 'list_budgets')); ?></li>
|
||||||
|
<li><?php echo $this->Html->link('Schulart ändern',array('controller' => 'budget', 'action' => 'change_school')); ?></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|||||||
3
webroot/css/budget-costum.css
Normal file
3
webroot/css/budget-costum.css
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
h1 {
|
||||||
|
color: aliceblue;
|
||||||
|
}
|
||||||
Binary file not shown.
Reference in New Issue
Block a user