Device links formatting changes (#15580)

Make the images inline so they appear side by side
Put newlines between the major device information sections (name, model/OS, location)
This commit is contained in:
eskyuu
2023-11-16 08:54:29 -06:00
committed by GitHub
co-authored by GitHub
parent faf66035ea
commit cc7e02cbcd
2 changed files with 12 additions and 6 deletions
+11 -6
View File
@@ -80,27 +80,32 @@ class Url
// beginning of overlib box contains large hostname followed by hardware & OS details
$contents = '<div><span class="list-large">' . $device->displayName() . '</span>';
$devinfo = '';
if ($device->hardware) {
$contents .= ' - ' . htmlentities($device->hardware);
$devinfo .= htmlentities($device->hardware);
}
if ($device->os) {
$contents .= ' - ' . htmlentities(Config::getOsSetting($device->os, 'text'));
$devinfo .= ($devinfo ? ' - ' : '') . htmlentities(Config::getOsSetting($device->os, 'text'));
}
if ($device->version) {
$contents .= ' ' . htmlentities($device->version);
$devinfo .= ($devinfo ? ' - ' : '') . htmlentities($device->version);
}
if ($device->features) {
$contents .= ' (' . htmlentities($device->features) . ')';
$devinfo .= ' (' . htmlentities($device->features) . ')';
}
if ($devinfo) {
$contents .= '<br />' . $devinfo;
}
if ($device->location_id) {
$contents .= ' - ' . htmlentities($device->location ?? '');
$contents .= '<br />' . htmlentities($device->location ?? '');
}
$contents .= '</div>';
$contents .= '</div><br />';
foreach ((array) $graphs as $entry) {
$graph = isset($entry['graph']) ? $entry['graph'] : 'unknown';
+1
View File
@@ -1567,6 +1567,7 @@ tr.search:nth-child(odd) {
}
.minigraph-image {
display: inline;
margin: 2px;
}