PHP_SMART_HOME_V3/app/templates/part/menu.phtml

51 lines
1.3 KiB
PHTML
Raw Permalink Normal View History

2019-09-19 12:48:31 +00:00
<div class="nav">
<?php
$menuItems = [
'fa-home' => [
'slug' => 'home',
'lngKey' => 'home',
'path' => './',
],
'fa-tachometer' => [
'slug' => 'dashboard',
'lngKey' => 'dashboard',
'path' => 'dashboard',
],
'fa-wrench' => [
'slug' => 'setting',
'lngKey' => 'settings',
'path' => 'setting',
],
'fa-calendar-o' => [
'slug' => 'automation',
'lngKey' => 'automatization',
'path' => 'automation',
],
'fa-terminal' => [
'slug' => 'scene',
'lngKey' => 'scenes',
'path' => 'scene',
],
'fa-bug' =>[
'slug' => 'log',
'lngKey' => 'log',
'path' => 'log',
],
];
2020-01-17 09:27:51 +00:00
foreach ( $menuItems as $key => $value) {
if ($DEBUGMOD == 0 && $value['path'] == 'log') {
continue;
}
?>
2019-09-19 12:48:31 +00:00
<div class="nav-item <?php echo ($ITEM == $value ? 'is-active' : ''); ?>">
<a href="<?php echo $value['path']?>">
<i class="fa <?php echo $key ?>"></i>
<span>
2019-10-11 12:12:05 +00:00
<?php $LANGMNG->echo('m_'.$value['lngKey']); ?>
2019-09-19 12:48:31 +00:00
</span>
</a>
</div>
<?php }?>
2020-01-17 09:27:51 +00:00
</div>