2019-08-23 11:39:42 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<?php
|
|
|
|
$partial = new Partial('head');
|
2019-10-11 14:38:20 +00:00
|
|
|
$partial->prepare('baseDir', $BASEDIR);
|
2019-08-23 11:39:42 +00:00
|
|
|
$partial->render();
|
|
|
|
?>
|
2019-09-26 18:48:53 +00:00
|
|
|
<title><?php echo $TITLE; ?></title>
|
2019-08-23 11:39:42 +00:00
|
|
|
</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">
|
2019-09-19 12:48:31 +00:00
|
|
|
<?php
|
|
|
|
$partial = new Partial('menu');
|
|
|
|
$partial->prepare('item', 'dashboard');
|
2019-10-11 12:12:05 +00:00
|
|
|
$partial->prepare('langMng',$LANGMNG);
|
2019-09-19 12:48:31 +00:00
|
|
|
$partial->render();
|
|
|
|
?>
|
2019-08-23 11:39:42 +00:00
|
|
|
</div>
|
|
|
|
<div class="col-md-9 main-body">
|
2019-10-11 12:12:05 +00:00
|
|
|
<a onClick="$('#modal').removeClass('modal-container-hiden').show();" class="button is-primary m-1"><?php $LANGMNG->echo('t_addDevice'); ?></a>
|
2019-08-23 11:39:42 +00:00
|
|
|
<div class="row no-gutters">
|
|
|
|
<?php foreach ($DASHBOARD as $dashboardItemId => $dashboardItemData) {
|
|
|
|
$partialDeviceButton = new Partial('dashboardButton');
|
|
|
|
$partialDeviceButton->prepare('dashboardItemData', $dashboardItemData);
|
2019-10-11 14:38:20 +00:00
|
|
|
|
2019-08-23 11:39:42 +00:00
|
|
|
$partialDeviceButton->render();
|
|
|
|
} ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-10-11 14:38:20 +00:00
|
|
|
|
2019-08-23 11:39:42 +00:00
|
|
|
<div class="modal-container modal-container-hiden" id="modal">
|
|
|
|
<div class="modal">
|
2019-08-24 11:13:04 +00:00
|
|
|
<div class="close">
|
|
|
|
<i class="fa fa-times"></i>
|
|
|
|
</div>
|
2019-10-11 12:12:05 +00:00
|
|
|
<h4 class="mb-4"><?php $LANGMNG->echo('t_addDevice'); ?></h4>
|
2019-08-25 12:07:01 +00:00
|
|
|
<form method="post">
|
2019-08-23 11:39:42 +00:00
|
|
|
<div class="field px-2">
|
2019-10-11 12:12:05 +00:00
|
|
|
<div class="label"><?php $LANGMNG->echo('l_choseDevice'); ?>:</div>
|
|
|
|
<select class="input" name="devices[]" multiple required>
|
2019-08-23 11:39:42 +00:00
|
|
|
<?php foreach ($SUBDEVICES as $subDeviceKey => $subDeviceValue){ ?>
|
|
|
|
<option value="<?php echo $subDeviceKey; ?>"><?php echo $subDeviceValue['name'] . '[' . $subDeviceValue['type'] . ']'; ?></option>
|
|
|
|
<?php } ?>
|
|
|
|
</select>
|
|
|
|
</div>
|
2019-10-11 12:12:05 +00:00
|
|
|
<input type="submit" class="button" name="modalFinal" value="<?php $LANGMNG->echo('b_create'); ?>"/>
|
2019-08-23 11:39:42 +00:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-10-11 14:38:20 +00:00
|
|
|
|
2019-08-23 11:39:42 +00:00
|
|
|
<?php
|
|
|
|
if (isset($_POST['deviceId'])) {
|
|
|
|
$partial = new Partial('deviceEdit');
|
|
|
|
$partial->prepare('DEVICEDATA', $DEVICEDATA);
|
2019-10-11 14:38:20 +00:00
|
|
|
|
2019-08-23 11:39:42 +00:00
|
|
|
$partial->render();
|
|
|
|
}
|
|
|
|
$partial = new Partial('footer');
|
|
|
|
$partial->render();
|
|
|
|
?>
|
|
|
|
</body>
|
|
|
|
</html>
|