Rearrange pricetable sections to improve legibility

This commit is contained in:
Björn Fromme
2019-09-16 13:53:53 +02:00
parent a61d8aab34
commit e4cad50526
2 changed files with 9 additions and 8 deletions
@@ -28,6 +28,10 @@
} }
} }
& .pricetable__section td {
background-color: $color-grey-lighter;
line-height: 32px;
}
} }
.pricetable__room-label { .pricetable__room-label {
@@ -8,16 +8,13 @@
<f:section name="Main"> <f:section name="Main">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped pricetable"> <table class="table table-striped pricetable">
<tr>
<th>Apartments</th>
<f:for each="{roomTypesLabels}" as="type">
<th>{type}</th>
</f:for>
</tr>
<f:for each="{categories}" as="category" key="categoryKey"> <f:for each="{categories}" as="category" key="categoryKey">
<f:if condition="{v:variable.get(name: 'pricetable.{categoryKey}', useRawKeys: 1) -> f:count()} > 0"> <f:if condition="{v:variable.get(name: 'pricetable.{categoryKey}', useRawKeys: 1) -> f:count()} > 0">
<tr> <tr class="pricetable__section">
<td colspan="{roomTypesPax -> f:count() -> v:math.sum(b: 1)}"><strong>{category}</strong></td> <td><strong>Apartments {category}</strong></td>
<f:for each="{roomTypesLabels}" as="type">
<td>{type}</td>
</f:for>
</tr> </tr>
<f:for each="{v:variable.get(name: 'pricetable.{categoryKey}', useRawKeys: 1)}" as="row"> <f:for each="{v:variable.get(name: 'pricetable.{categoryKey}', useRawKeys: 1)}" as="row">
<tr> <tr>