2019-08-24 11:13:04 +00:00
|
|
|
<div class="col-12 col-md-6 col-xl-4 square-wrap">
|
|
|
|
<div class="rectangle-2">
|
2019-10-11 15:35:06 +00:00
|
|
|
<div class="square-content double <?php echo ($AUTOMATIONDATA['active'] == 0 ? 'is-inactive' : ''); ?>" id="automation-<?php echo $AUTOMATIONID; ?>">
|
2019-08-24 11:13:04 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-1">
|
|
|
|
<h5 class="fa">
|
|
|
|
<?php
|
|
|
|
//echo $AUTOMATIONDATA['ifSomething'];
|
2019-10-08 16:30:44 +00:00
|
|
|
$ifCode = json_decode($AUTOMATIONDATA['ifSomething']);
|
|
|
|
switch ($ifCode->type) {
|
2019-08-24 11:13:04 +00:00
|
|
|
case 'sunSet':
|
|
|
|
echo'';
|
|
|
|
break;
|
2019-10-08 16:30:44 +00:00
|
|
|
|
2019-08-24 11:13:04 +00:00
|
|
|
case 'sunRise':
|
|
|
|
echo' ';
|
|
|
|
break;
|
2019-10-08 16:30:44 +00:00
|
|
|
|
2019-08-24 11:13:04 +00:00
|
|
|
case 'inHome':
|
|
|
|
echo'';
|
|
|
|
break;
|
2019-10-08 16:30:44 +00:00
|
|
|
|
2019-08-24 11:13:04 +00:00
|
|
|
case 'outHome':
|
|
|
|
echo'';
|
|
|
|
break;
|
2019-10-08 16:30:44 +00:00
|
|
|
|
2019-08-24 11:13:04 +00:00
|
|
|
case 'outDevice':
|
|
|
|
echo'';
|
|
|
|
break;
|
2019-10-08 16:30:44 +00:00
|
|
|
|
2019-08-24 11:13:04 +00:00
|
|
|
default:
|
|
|
|
echo'';
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</h5>
|
|
|
|
</div>
|
|
|
|
<div class="col">
|
|
|
|
<h5 class="text-right break-all">
|
2019-10-08 16:23:57 +00:00
|
|
|
<?php
|
|
|
|
/*if (!in_array($AUTOMATIONDATA['ifSomething'], ["sunRise", "sunSet"])) {
|
2019-08-24 11:13:04 +00:00
|
|
|
echo $AUTOMATIONDATA['ifSomething'];
|
2019-10-08 16:23:57 +00:00
|
|
|
}*/
|
|
|
|
echo $AUTOMATIONDATA['name'];
|
2019-08-24 11:13:04 +00:00
|
|
|
?>
|
|
|
|
</h5>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col">
|
|
|
|
<?php echo implode(', ',$AUTOMATIONDATA['onDays']);?>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-10-08 16:23:57 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col">
|
2019-10-11 15:41:58 +00:00
|
|
|
<a class="button is-primary m-1" onClick="restartAutomation(<?php echo $AUTOMATIONID; ?>);"><?php $LANGMNG->echo('b_restart')?></a>
|
2019-10-08 16:23:57 +00:00
|
|
|
</div>
|
|
|
|
<div class="col">
|
2019-10-11 15:41:58 +00:00
|
|
|
<a class="button is-primary m-1" onClick="toggleAutomation(<?php echo $AUTOMATIONID; ?>);"><?php $LANGMNG->echo('b_disable')?></a>
|
2019-10-08 16:23:57 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-08-24 11:13:04 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-10-08 16:23:57 +00:00
|
|
|
</div>
|