91 lines
3.9 KiB
PHTML
91 lines
3.9 KiB
PHTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<?php
|
|
$partial = new Partial('head');
|
|
$partial->render();
|
|
?>
|
|
<title><?php echo $TITLE ?></title>
|
|
</head>
|
|
<body class="no-transitions">
|
|
<div class="row no-gutters main">
|
|
<div class="col-md-3 d-sm-none"></div>
|
|
<div class="col-md-3 nav-container">
|
|
<div class="nav">
|
|
<div class="nav-item">
|
|
<a href="./"><i class="fa fa-home"></i><span><?php echo $LANG['m_home']?></span></a>
|
|
</div>
|
|
<div class="nav-item">
|
|
<a href="dashboard"><i class="fa fa-tachometer" aria-hidden="true"></i><span><?php echo $LANG['m_dashboard']?></span></a>
|
|
</div>
|
|
<div class="nav-item">
|
|
<a href="setting"><i class="fa fa-wrench" aria-hidden="true"></i></i><span><?php echo $LANG['m_settings']?></span></a>
|
|
</div>
|
|
<div class="nav-item">
|
|
<a href="automation"><i class="fa fa-calendar-o" aria-hidden="true"></i><span><?php echo $LANG['m_automatization']?></span></a>
|
|
</div>
|
|
<div class="nav-item is-active">
|
|
<a href="scene"><i class="fa fa-terminal" aria-hidden="true"></i><span><?php echo $LANG['m_scenes']?></span></a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-9 main-body">
|
|
<a class="button is-primary m-2" onClick="$('#modal').removeClass('modal-container-hiden').show();"><?php echo $LANG['t_createScene'];?></a>
|
|
<div class="row no-gutters">
|
|
<?php foreach ($SCENES as $sceneId => $sceneData) { ?>
|
|
<div class="col-12 col-md-6 col-xl-4 square-wrap">
|
|
<div class="rectangle-2">
|
|
<div class="square-content double" id="scene-<?php echo $sceneId ?>" onClick="ajaxPost('ajax',{scene_id:'<?php echo $sceneId; ?>'}, this);" >
|
|
<div class="row">
|
|
<div class="col-1">
|
|
<h5 class="fa">
|
|
&#x<?php echo $sceneData['icon']; ?>
|
|
</h5>
|
|
</div>
|
|
<div class="col">
|
|
<h5 class="text-right break-all">
|
|
<?php echo $sceneData['name']; ?>
|
|
</h5>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php
|
|
// Edit
|
|
$partialSceneEdit = new Partial('sceneEdit');
|
|
$partialSceneEdit->prepare('lang',$LANG);
|
|
$partialSceneEdit->prepare('sceneId',$sceneId);
|
|
$partialSceneEdit->prepare('scene',$sceneData);
|
|
|
|
|
|
$partialSceneEdit->render();
|
|
?>
|
|
<?php } ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php if (isset($_POST['devices'])) {
|
|
$partial = new Partial('sceneCreateOptions');
|
|
$partial->prepare('lang',$LANG);
|
|
$partial->prepare('setStateFormDevices',$SETSTATEFORMDEVICES );
|
|
$partial->prepare('sceneIcon',$SCENEICON );
|
|
$partial->prepare('SceneName',$SCENENAME );
|
|
$partial->render();
|
|
} else {
|
|
$partial = new Partial('sceneCreate');
|
|
$partial->prepare('lang',$LANG);
|
|
$partial->prepare('subDevices',$SUBDEVICES);
|
|
$partial->render();
|
|
}
|
|
$partial = new Partial('footer');
|
|
$partial->render();
|
|
?>
|
|
</body>
|
|
</html>
|