Icons Color and Icon CHanges

This commit is contained in:
Václav Španinger 2020-09-07 11:18:17 +02:00
parent 366f1c4db4
commit 50e161e1ce
1 changed files with 17 additions and 1 deletions

View File

@ -46,7 +46,23 @@
<td>Room</td>
<td>
<?php if (!empty($device['mac'])) : ?>
<i class="fa <?php echo (!empty($device['firmware_hash']) ? ($device['firmware_hash'] != "need" ? "fa-check-circle" : "fa-circle") : "fa-times-circle"); ?>" style="float: center; <?php echo (!empty($device['firmware_hash']) ? ($device['firmware_hash'] != "need" ? "color: green;" : "color: yellow;") : "color: red;"); ?>"></i>
<?php
$icon = "fa-circle";
$color = "yellow";
if (!empty($device['firmware_hash'])) {
if ($device['firmware_hash'] == "true") {
$icon = "fa-check-circle";
$color = "green";
} else if ($device['firmware_hash'] == "need") {
$icon = "arrow-circle-up";
} else {
$icon = "fa-times-circle";
$color = "red";
}
}
?>
<i class="fa <?php echo $icon; ?>" style="color: <?php echo $color; ?>"></i>
<?php echo $device['firmware_hash'] ?>
<button class="fa custom-file-input" type="button" onclick="document.getElementById('deviceFirmware-<?php echo $device['device_id']?>').click();">&#xf0ee;</button>
<form style="display: none;" method="post" action="" enctype="multipart/form-data">