Add optional modules to a container and add color acording to availability

This commit is contained in:
Sukhwinder Dhillon 2021-10-14 14:25:58 +02:00
parent 9cb9387206
commit 681f908218
2 changed files with 18 additions and 4 deletions

View File

@ -107,7 +107,7 @@
$i = 0;
$has = $moduleManager->hasAny($modules);
?>
<tbody class="optional-module-group">
<tbody class="optional-module-group <?= ! $has ? 'missing-all-optional' : null ?>">
<?php foreach ($modules as $moduleName => $versionString): ?>
<?php if ($i > 0): ?>
<tr><th class="or-separator"><?= $this->translate('or') ?></th></tr>

View File

@ -441,9 +441,23 @@ a:hover > .icon-cancel {
font-weight: bold;
}
.or-separator {
position: relative;
transform: translate(70%, 0);
.optional-module-group {
display: block;
margin-top: 1em;
margin-left: -1.1em;
padding-left: 1em;
border-left: 2px solid;
.var(border-left-color, color-up);
&.missing-all-optional {
.var(border-left-color, color-critical);
}
.or-separator {
position: absolute;
transform: translate(0, -50%);
right: 0;
}
}
}
}