PHP_SMART_HOME_V3/app/templates/part/automationButton.phtml

64 lines
2.4 KiB
PHTML
Raw Normal View History

2019-08-24 11:13:04 +00:00
<div class="col-12 col-md-6 col-xl-4 square-wrap">
<div class="rectangle-2">
<div class="square-content double <?php echo ($AUTOMATIONDATA['active'] == 0 ? 'paused' : ''); ?>" id="automation-<?php echo $AUTOMATIONID; ?>">
<div class="row">
<div class="col-1">
<h5 class="fa">
<?php
//echo $AUTOMATIONDATA['ifSomething'];
switch ($AUTOMATIONDATA['ifSomething']) {
case 'sunSet':
echo'&#xf186';
break;
2019-10-08 16:23:57 +00:00
2019-08-24 11:13:04 +00:00
case 'sunRise':
echo'&#xf185 ';
break;
2019-10-08 16:23:57 +00:00
2019-08-24 11:13:04 +00:00
case 'inHome':
echo'&#xf090';
break;
2019-10-08 16:23:57 +00:00
2019-08-24 11:13:04 +00:00
case 'outHome':
echo'&#xf08b';
break;
2019-10-08 16:23:57 +00:00
2019-08-24 11:13:04 +00:00
case 'outDevice':
echo'&#xf2db';
break;
2019-10-08 16:23:57 +00:00
2019-08-24 11:13:04 +00:00
default:
echo'&#xf017';
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">
<a class="button is-primary m-1" onclick="$('#modal').removeClass('modal-container-hiden').show();">restart</a>
</div>
<div class="col">
<a class="button is-primary m-1" onclick="$('#modal').removeClass('modal-container-hiden').show();">deaktivovat</a>
</div>
</div>
2019-08-24 11:13:04 +00:00
</div>
</div>
2019-10-08 16:23:57 +00:00
</div>