Split info page into two columns
This commit is contained in:
parent
a00d6c78d2
commit
6782d518eb
@ -8,6 +8,7 @@
|
||||
</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<?php
|
||||
require_once __DIR__ . "/../machine.php";
|
||||
|
||||
@ -18,6 +19,7 @@
|
||||
|
||||
if (count($info) > 0) {
|
||||
?>
|
||||
<div class="col-sm-6 mb-3">
|
||||
<h6>Machine Info:</h6>
|
||||
<div class="list-group">
|
||||
<?php
|
||||
@ -64,26 +66,6 @@
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
$history = $machine->getHistory();
|
||||
|
||||
if (count($history) > 0) {
|
||||
?>
|
||||
<h6 class="mt-3">History:</h6>
|
||||
<div class="list-group">
|
||||
<?php
|
||||
foreach ($history as $h) {
|
||||
echo "<div class=\"list-group-item\">\n";
|
||||
echo "<b>$h[eventname]</b> on " . date(DATETIME_FORMAT, strtotime($h['date'])) . "<br />\n";
|
||||
if (!empty($h['notes'])) {
|
||||
echo "<div>" . htmlspecialchars($h['notes']) . "</div>";
|
||||
}
|
||||
echo "\n</div>\n";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
@ -93,7 +75,8 @@
|
||||
|
||||
if (count($components) > 0) {
|
||||
?>
|
||||
<h6 class="mt-3">Components:</h6>
|
||||
<div class="col-sm-6 mb-3">
|
||||
<h6>Components:</h6>
|
||||
<div class="list-group">
|
||||
<?php
|
||||
foreach ($components as $c) {
|
||||
@ -116,6 +99,30 @@
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
$history = $machine->getHistory();
|
||||
|
||||
if (count($history) > 0) {
|
||||
?>
|
||||
<div class="col-sm-6 mb-3">
|
||||
<h6>History:</h6>
|
||||
<div class="list-group">
|
||||
<?php
|
||||
foreach ($history as $h) {
|
||||
echo "<div class=\"list-group-item\">\n";
|
||||
echo "<b>$h[eventname]</b> on " . date(DATETIME_FORMAT, strtotime($h['date'])) . "<br />\n";
|
||||
if (!empty($h['notes'])) {
|
||||
echo "<div>" . htmlspecialchars($h['notes']) . "</div>";
|
||||
}
|
||||
echo "\n</div>\n";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
} catch (Exception $ex) {
|
||||
@ -123,6 +130,7 @@
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p>Look up another machine:</p>
|
||||
<form method="GET">
|
||||
|
Loading…
x
Reference in New Issue
Block a user