aboutsummaryrefslogtreecommitdiff
path: root/views/list/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/list/index.php')
-rw-r--r--views/list/index.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/views/list/index.php b/views/list/index.php
index 4a84f78..d422630 100644
--- a/views/list/index.php
+++ b/views/list/index.php
@@ -38,10 +38,16 @@
</section>
<section>
<?php
- foreach ($list->allItems() as $page) {
- include $VIEWS_DIR . '/archive/item.php';
+ $items = $list->allItems();
+ if (!$items) {
+ echo '<h1>No archives</h1>';
+ }
+ else {
+ foreach ($list->allItems() as $page) {
+ include $VIEWS_DIR . '/archive/item.php';
+ }
+ include_once $VIEWS_DIR . '/archive/item_show.php';
}
- include_once $VIEWS_DIR . '/archive/item_show.php';
?>
</section>
</section>