Change colors of tables

This commit is contained in:
Frank Schubert
2021-08-24 23:31:17 +02:00
parent 045e94fe17
commit 5e80c8b662
2 changed files with 12 additions and 4 deletions
+4 -4
View File
@@ -30,8 +30,8 @@
<?php foreach($networks as $networkname => $buildings): ?> <?php foreach($networks as $networkname => $buildings): ?>
<?php if(!count($buildings)) continue; ?> <?php if(!count($buildings)) continue; ?>
<h4><?=$networkname?></h4> <h4><?=$networkname?></h4>
<table class="table table-striped table-hover"> <table class="table table-hover">
<?php foreach($buildings as $building): ?> <?php $bcount = 0; foreach($buildings as $building): ?>
<?php <?php
$rowspan = 1; $rowspan = 1;
foreach($building->workflowitems as $item) { foreach($building->workflowitems as $item) {
@@ -40,7 +40,7 @@
} }
} }
?> ?>
<tr id="building-<?=$building->id?>"> <tr id="building-<?=$building->id?>" class="table-bg-<?=($bcount % 2 == 0) ? "even" : "odd"?>">
<td> <td>
<strong><?=$building->street?></strong><br /> <strong><?=$building->street?></strong><br />
<?=$building->code?><br /> <?=$building->code?><br />
@@ -65,7 +65,7 @@
</table> </table>
</td> </td>
</tr> </tr>
<?php endforeach; ?> <?php $bcount++; endforeach; ?>
</table> </table>
<?php endforeach; ?> <?php endforeach; ?>
<button type="submit" class="btn btn-primary">Speichern</button> <button type="submit" class="btn btn-primary">Speichern</button>
+8
View File
@@ -33,6 +33,14 @@
cursor: pointer; cursor: pointer;
} }
.table-bg-even {
background-color: #f1f5f7;
}
.table-bg-odd {
}
td.controls { td.controls {
cursor: default; cursor: default;
text-align: left; letter-spacing: 4px; font-size: 1.1em; text-align: left; letter-spacing: 4px; font-size: 1.1em;