2019-08-23 11:39:42 +00:00
|
|
|
<?php
|
|
|
|
$action = "";
|
|
|
|
if ($SUBDEVICE['type'] == 'on/off') {
|
2019-10-09 17:23:20 +00:00
|
|
|
$action = 'onClick="ajaxPost(\'ajax\',{subDevice_id:\'' . $SUBDEVICEID . '\', action:\'change\'}, this);"';
|
2019-08-23 11:39:42 +00:00
|
|
|
}
|
|
|
|
//neaktivní zařízení is-inactive
|
|
|
|
?>
|
|
|
|
|
|
|
|
<div class="device-button col-4 col-sm-3 col-xl-2 square-wrap" <?php echo $action; ?> data-room-id="<?php echo $ROOMID; ?>">
|
|
|
|
<div class="square">
|
2019-08-24 11:07:07 +00:00
|
|
|
<div class="square-content <?php echo (($SUBDEVICE['comError'] == 1 || $DEVICE['approved'] == 0) ? "is-inactive" : "") ;?>" id="device-<?php echo $DEVICEID ?>" data-sub-device-id="<?php echo $SUBDEVICEID;?>">
|
2019-08-23 11:39:42 +00:00
|
|
|
<div class="content">
|
2019-09-23 19:11:06 +00:00
|
|
|
<div class="row no-gutters">
|
2019-08-23 11:39:42 +00:00
|
|
|
<div class="col">
|
|
|
|
<h5 unselectable="on" class="fa">&#x<?php echo $DEVICE['icon'] ?></h5>
|
|
|
|
</div>
|
|
|
|
<div class="col">
|
2020-03-30 06:56:06 +00:00
|
|
|
<?php if ($SUBDEVICE['type'] == 'temp_cont') { ?>
|
|
|
|
<input type="number" step="5" class="device-button-value text-right" id="value_control" value="<?php echo $SUBDEVICE['lastRecort']['value'] ?>"><?php echo $SUBDEVICE['unit']?>
|
|
|
|
<style>
|
|
|
|
input.device-button-value.text-right {
|
|
|
|
width: inherit;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<?php } else { ?>
|
2019-08-23 11:39:42 +00:00
|
|
|
<h5 unselectable="on" class="device-button-value text-right" title="<?php echo $SUBDEVICE['lastRecort']['time']; ?>"><?php echo $SUBDEVICE['lastRecort']['value'] . $SUBDEVICE['unit']?></h5>
|
2020-03-30 06:56:06 +00:00
|
|
|
<?php } ?>
|
2019-08-23 11:39:42 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
2019-09-23 19:11:06 +00:00
|
|
|
<div class="col button-text" unselectable="on" >
|
2019-08-23 11:39:42 +00:00
|
|
|
<?php echo $DEVICE['name']; ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|