Device Room Select
This commit is contained in:
parent
50e161e1ce
commit
6945d58eb6
@ -6,6 +6,7 @@ class Device extends Template
|
||||
function __construct () {
|
||||
$userManager = new UserManager ();
|
||||
$deviceManager = new DeviceManager ();
|
||||
$roomManager = new RoomManager ();
|
||||
$langMng = new LanguageManager ('en');
|
||||
|
||||
if (!$userManager->isLogin ()) {
|
||||
@ -31,9 +32,12 @@ class Device extends Template
|
||||
}
|
||||
}
|
||||
|
||||
$rooms = $roomManager->getAllRooms();
|
||||
|
||||
$template->prepare ('baseDir', BASEDIR);
|
||||
$template->prepare ('debugMod', DEBUGMOD);
|
||||
$template->prepare ('logToLiveTime', LOGTIMOUT);
|
||||
$template->prepare ('rooms', $rooms);
|
||||
$template->prepare ('devices', $devices);
|
||||
$template->prepare ('langMng', $langMng);
|
||||
|
||||
|
@ -43,7 +43,15 @@
|
||||
<tr>
|
||||
<td><i class="fa">&#x<?php echo (!empty($device['icon']) ? $device['icon'] : ""); ?></i></td>
|
||||
<td><?php echo (!empty($device['name']) ? $device['name'] : ""); ?></td>
|
||||
<td>Room</td>
|
||||
<td>
|
||||
<select class="input" id="device-<?php echo $device['device_id']?>-roomId">
|
||||
<?php
|
||||
foreach ($ROOMS as $key => $room) {
|
||||
echo '<option value="'.$room['room_id'].'" '.($device['room_id'] == $room['room_id'] ? 'selected' : '').'>'.$room['name'].'</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<?php if (!empty($device['mac'])) : ?>
|
||||
<?php
|
||||
|
Loading…
Reference in New Issue
Block a user