Switch order of events and components on public tracking page
This commit is contained in:
parent
e66a35d156
commit
82eef074d2
@ -246,6 +246,28 @@ if (isset($_GET["backgroundcolor"]) && !empty($_GET["backgroundcolor"]) && preg_
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$history = $machine->getEvents();
|
||||
|
||||
if (count($history) > 0) {
|
||||
?>
|
||||
<div class="col-sm-6 mb-3">
|
||||
<h6>Events:</h6>
|
||||
<div class="list-group">
|
||||
<?php
|
||||
foreach ($history as $h) {
|
||||
echo "<div class=\"list-group-item\">\n";
|
||||
echo "<b>" . $h->getName() . "</b> on " . date($SETTINGS["datetime_format"], strtotime($h->getDate())) . "<br />\n";
|
||||
if (!empty($h->getPublicNotes())) {
|
||||
echo "<div><b>Notes:</b><br /><div class=\"ml-3\">" . htmlspecialchars($h->getPublicNotes()) . "</div></div>";
|
||||
}
|
||||
echo "\n</div>\n";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
$components = $machine->getComponents();
|
||||
|
||||
if (count($components) > 0) {
|
||||
@ -309,29 +331,6 @@ if (isset($_GET["backgroundcolor"]) && !empty($_GET["backgroundcolor"]) && preg_
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
$history = $machine->getEvents();
|
||||
|
||||
if (count($history) > 0) {
|
||||
?>
|
||||
<div class="col-sm-6 mb-3">
|
||||
<h6>Events:</h6>
|
||||
<div class="list-group">
|
||||
<?php
|
||||
foreach ($history as $h) {
|
||||
echo "<div class=\"list-group-item\">\n";
|
||||
echo "<b>" . $h->getName() . "</b> on " . date($SETTINGS["datetime_format"], strtotime($h->getDate())) . "<br />\n";
|
||||
if (!empty($h->getPublicNotes())) {
|
||||
echo "<div><b>Notes:</b><br /><div class=\"ml-3\">" . htmlspecialchars($h->getPublicNotes()) . "</div></div>";
|
||||
}
|
||||
echo "\n</div>\n";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user