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

View File

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

View File

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

View File

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

View File

@ -32,7 +32,11 @@
'path' => 'log', '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' : ''); ?>"> <div class="nav-item <?php echo ($ITEM == $value ? 'is-active' : ''); ?>">
<a href="<?php echo $value['path']?>"> <a href="<?php echo $value['path']?>">
<i class="fa <?php echo $key ?>"></i> <i class="fa <?php echo $key ?>"></i>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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