Tweak handling of empty list sections

This commit is contained in:
Timothy Warren 2017-09-14 17:33:24 -04:00
parent b0ee397994
commit 04ec5b2fd6
4 changed files with 155 additions and 133 deletions

View File

@ -6,6 +6,12 @@
<h3>There's nothing here!</h3>
<?php else: ?>
<?php foreach ($sections as $name => $items): ?>
<?php if (empty($items)): ?>
<section class="status">
<h2><?= $escape->html($name) ?></h2>
<h3>There's nothing here!</h3>
</section>
<?php else: ?>
<section class="status">
<h2><?= $escape->html($name) ?></h2>
<section class="media-wrap">
@ -88,6 +94,7 @@
<?php endforeach ?>
</section>
</section>
<?php endif ?>
<?php endforeach ?>
<?php endif ?>
</main>

View File

@ -7,6 +7,9 @@
<?php else: ?>
<?php foreach ($sections as $name => $items): ?>
<h2><?= $name ?></h2>
<?php if (empty($items)): ?>
<h3>There's nothing here!</h3>
<?php else: ?>
<table>
<thead>
<tr>
@ -87,6 +90,7 @@
<?php endforeach ?>
</tbody>
</table>
<?php endif ?>
<?php endforeach ?>
<?php endif ?>
</main>

View File

@ -6,6 +6,12 @@
<h3>There's nothing here!</h3>
<?php else: ?>
<?php foreach ($sections as $name => $items): ?>
<?php if (empty($items)): ?>
<section class="status">
<h2><?= $escape->html($name) ?></h2>
<h3>There's nothing here!</h3>
</section>
<?php else: ?>
<section class="status">
<h2><?= $escape->html($name) ?></h2>
<section class="media-wrap">
@ -78,6 +84,7 @@
<?php endforeach ?>
</section>
</section>
<?php endif ?>
<?php endforeach ?>
<?php endif ?>
</main>

View File

@ -7,6 +7,9 @@
<?php else: ?>
<?php foreach ($sections as $name => $items): ?>
<h2><?= $name ?></h2>
<?php if (empty($items)): ?>
<h3>There's nothing here!</h3>
<?php else: ?>
<table>
<thead>
<tr>
@ -65,6 +68,7 @@
<?php endforeach ?>
</tbody>
</table>
<?php endif ?>
<?php endforeach ?>
<?php endif ?>
</main>