Skip to content

Commit 263a5a4

Browse files
committed
Fix table footer for C5.x
1 parent e8db1b4 commit 263a5a4

File tree

1 file changed

+35
-41
lines changed

1 file changed

+35
-41
lines changed

contao/templates/elements/ce_table.html5

Lines changed: 35 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -13,43 +13,37 @@
1313
<?php endif; ?>
1414

1515
<?php if ($this->useHeader): ?>
16-
<?php if (!$blnContao5): ?>
17-
<thead>
16+
<thead>
1817
<tr>
19-
<?php foreach ($this->header as $col): ?>
20-
<th class="<?= $col['class'] ?>"><?= $col['content'] ?></th>
21-
<?php endforeach; ?>
18+
<?php if (!$blnContao5): ?>
19+
<?php foreach ($this->header as $col): ?>
20+
<th class="<?= $col['class'] ?>"><?= $col['content'] ?></th>
21+
<?php endforeach; ?>
22+
<?php else: ?>
23+
<?php foreach ($this->header as $i => $col): ?>
24+
<?php if (0 == $i && $this->useLeftTh): ?>
25+
<th class="unsortable"><?= $col ?></th>
26+
<?php else: ?>
27+
<th><?= $col ?></th>
28+
<?php endif; ?>
29+
<?php endforeach; ?>
30+
<?php endif; ?>
2231
</tr>
23-
</thead>
24-
<?php else: ?>
25-
<thead>
32+
</thead>
33+
<?php endif; ?>
34+
35+
<?php if ($this->useFooter): ?>
36+
<tfoot>
2637
<tr>
27-
<?php foreach ($this->header as $i => $col): ?>
28-
<?php if (0 == $i && $this->useLeftTh): ?>
29-
<th class="unsortable"><?= $col ?></th>
38+
<?php foreach ($this->footer as $col): ?>
39+
<?php if (!$blnContao5): ?>
40+
<td class="<?= $col['class'] ?>"><?= $col['content'] ?></td>
3041
<?php else: ?>
31-
<th><?= $col ?></th>
42+
<td><?= $col ?></td>
3243
<?php endif; ?>
3344
<?php endforeach; ?>
3445
</tr>
35-
</thead>
36-
<?php endif; ?>
37-
<?php endif; ?>
38-
39-
<?php if ($this->useFooter): ?>
40-
<?php if (!$blnContao5): ?>
41-
<tfoot>
42-
<tr>
43-
<?php foreach ($this->footer as $col): ?>
44-
<td class="<?= $col['class'] ?>"><?= $col['content'] ?></td>
45-
<?php endforeach; ?>
46-
</tr>
47-
</tfoot>
48-
<?php else: ?>
49-
<?php foreach ($this->footer as $col): ?>
50-
<td><?= $col ?></td>
51-
<?php endforeach; ?>
52-
<?php endif; ?>
46+
</tfoot>
5347
<?php endif; ?>
5448

5549
<tbody>
@@ -66,17 +60,17 @@
6660
</tr>
6761
<?php endforeach; ?>
6862
<?php else: ?>
69-
<?php foreach ($this->body as $row): ?>
70-
<tr>
71-
<?php foreach ($row as $i => $col): ?>
72-
<?php if (0 == $i && $this->useLeftTh): ?>
73-
<th scope="row"><?= $col ?></th>
74-
<?php else: ?>
75-
<td><?= $col ?></td>
76-
<?php endif; ?>
77-
<?php endforeach; ?>
78-
</tr>
79-
<?php endforeach; ?>
63+
<?php foreach ($this->body as $row): ?>
64+
<tr>
65+
<?php foreach ($row as $i => $col): ?>
66+
<?php if (0 == $i && $this->useLeftTh): ?>
67+
<th scope="row"><?= $col ?></th>
68+
<?php else: ?>
69+
<td><?= $col ?></td>
70+
<?php endif; ?>
71+
<?php endforeach; ?>
72+
</tr>
73+
<?php endforeach; ?>
8074
<?php endif; ?>
8175
</tbody>
8276
</table>

0 commit comments

Comments
 (0)