diff options
Diffstat (limited to 'views')
| -rw-r--r-- | views/user/index.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/views/user/index.php b/views/user/index.php index ef888c7..a674839 100644 --- a/views/user/index.php +++ b/views/user/index.php @@ -44,22 +44,33 @@ </nav> <section id="userArchives"> <?php - foreach ($user->archives() as $page) { + $archives = $user->archives(); + foreach ($archives as $page) { include $VIEWS_DIR . '/archive/item.php'; } include_once $VIEWS_DIR . '/archive/item_show.php'; ?> + + <?php if (count($archives) === 0): ?> + <h1>No archives</h1> + <?php endif; ?> </section> <section id="userLists" hidden> <?php - foreach ($user->archiveLists() as $list) { + $archiveLists = $user->archiveLists(); + foreach ($archiveLists as $list) { include $VIEWS_DIR . '/list/item.php'; } include_once $VIEWS_DIR . '/list/item_show.php'; ?> + + <?php if (count($archiveLists) === 0): ?> + <h1>No lists</h1> + <?php endif; ?> </section> + <script type="text/javascript"> const elemOpenArchives = document.getElementById('openArchives'); const elemOpenLists = document.getElementById('openLists'); |
