DEBUGMODE in FRONTEND

This commit is contained in:
JonatanRek 2020-01-17 10:27:51 +01:00
parent f345419c39
commit 3479fb9c87
15 changed files with 73 additions and 51 deletions

View File

@ -16,6 +16,7 @@
$partial = new Partial('menu');
$partial->prepare('item','automation');
$partial->prepare('langMng',$LANGMNG);
$partial->prepare('debugMod',$DEBUGMOD);
$partial->render();
?>
</div>
@ -33,6 +34,7 @@
//EDIT
$partial = new Partial('automationEdit');
$partial->prepare('langMng',$LANGMNG);
$partial->prepare('userManager',$USERMANAGER);
$partial->prepare('automationId',$automationId);
$partial->prepare('automation',$automationData);
$partial->prepare('subDevices',$SUBDEVICES);
@ -45,11 +47,13 @@
if (isset($_POST['modalNext'])) {
$partial = new Partial('automationCreateFinal');
$partial->prepare('langMng',$LANGMNG);
$partial->prepare('userManager',$USERMANAGER);
$partial->prepare('subDevices',$SUBDEVICES);
$partial->render();
} else {
$partial = new Partial('automationCreate');
$partial->prepare('langMng',$LANGMNG);
$partial->prepare('subDevices',$SUBDEVICES);
$partial->render();
}?>

View File

@ -16,6 +16,7 @@
$partial = new Partial('menu');
$partial->prepare('item', 'dashboard');
$partial->prepare('langMng',$LANGMNG);
$partial->prepare('debugMod',$DEBUGMOD);
$partial->render();
?>
</div>

View File

@ -16,6 +16,7 @@
$partial = new Partial('menu');
$partial->prepare('item', 'home');
$partial->prepare('langMng',$LANGMNG);
$partial->prepare('debugMod',$DEBUGMOD);
$partial->render();
?>
</div>

View File

@ -16,6 +16,7 @@
$partial = new Partial('menu');
$partial->prepare('item', 'log');
$partial->prepare('langMng',$LANGMNG);
$partial->prepare('debugMod',$DEBUGMOD);
$partial->render();
?>
</div>

View File

@ -32,7 +32,11 @@
'path' => 'log',
],
];
foreach ( $menuItems as $key => $value) { ?>
foreach ( $menuItems as $key => $value) {
if ($DEBUGMOD == 0 && $value['path'] == 'log') {
continue;
}
?>
<div class="nav-item <?php echo ($ITEM == $value ? 'is-active' : ''); ?>">
<a href="<?php echo $value['path']?>">
<i class="fa <?php echo $key ?>"></i>

View File

@ -16,6 +16,7 @@
$partial = new Partial('menu');
$partial->prepare('item', 'rooms');
$partial->prepare('lang',$LANG);
$partial->prepare('debugMod',$DEBUGMOD);
$partial->render();
?>
</div>

View File

@ -16,6 +16,7 @@
$partial = new Partial('menu');
$partial->prepare('item', 'scene');
$partial->prepare('langMng',$LANGMNG);
$partial->prepare('debugMod',$DEBUGMOD);
$partial->render();
?>
</div>

View File

@ -16,6 +16,7 @@
$partial = new Partial('menu');
$partial->prepare('item', 'setting');
$partial->prepare('langMng',$LANGMNG);
$partial->prepare('debugMod',$DEBUGMOD);
$partial->render();
?>
</div>

View File

@ -52,6 +52,7 @@ class Automation extends Template
$template = new Template('automation');
$template->prepare('baseDir', BASEDIR);
$template->prepare('debugMod', DEBUGMOD);
$template->prepare('title', 'Automation');
$template->prepare('langMng', $langMng);
$template->prepare('userManager', $userManager);

View File

@ -81,6 +81,7 @@ class Dashboard extends Template
}
$template->prepare('baseDir', BASEDIR);
$template->prepare('debugMod', DEBUGMOD);
$template->prepare('title', 'Nástěnka');
$template->prepare('langMng', $langMng);
$template->prepare('dashboard', $dashboard);

View File

@ -177,6 +177,7 @@ class Home extends Template
$rooms = RoomManager::getAllRooms();
$template->prepare('baseDir', BASEDIR);
$template->prepare('debugMod', DEBUGMOD);
$template->prepare('title', 'Home');
$template->prepare('rooms', $rooms);
$template->prepare('langMng', $langMng);

View File

@ -15,6 +15,8 @@ class Login extends Template
$template->prepare('title', 'Home');
$template->prepare('lang', $lang);
$template->render();
}
}

View File

@ -15,6 +15,7 @@ class Rooms extends Template
$template = new Template('rooms');
$template->prepare('baseDir', BASEDIR);
$template->prepare('debugMod', DEBUGMOD);
$template->prepare('title', 'Rooms');
$template->prepare('lang', $lang);

View File

@ -12,6 +12,7 @@ class Scene extends Template
$template = new Template('scene');
$template->prepare('baseDir', BASEDIR);
$template->prepare('debugMod', DEBUGMOD);
$template->prepare('title', 'Scény');
$template->prepare('langMng', $langMng);

View File

@ -24,6 +24,7 @@ class Setting extends Template
$template = new Template('setting');
$template->prepare('baseDir', BASEDIR);
$template->prepare('debugMod', DEBUGMOD);
$template->prepare('title', 'Automation');
$template->prepare('langMng', $langMng);
$template->prepare('automations', $automations);