Show placeholder when a user does not have any saved wishlists
This commit is contained in:
parent
7840ee2cb7
commit
86e1457c82
1 changed files with 26 additions and 19 deletions
|
@ -12,13 +12,16 @@ $page = new Page(__FILE__, __('Remembered lists'));
|
||||||
$page->header();
|
$page->header();
|
||||||
$page->bodyStart();
|
$page->bodyStart();
|
||||||
$page->navigation();
|
$page->navigation();
|
||||||
|
|
||||||
|
$wishlists = $user->getSavedWishlists();
|
||||||
?>
|
?>
|
||||||
<main>
|
<main>
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<h1 class="ui header"><?= $page->title ?></h1>
|
<h1 class="ui header"><?= $page->title ?></h1>
|
||||||
|
|
||||||
|
<?php if (!empty($wishlists)) { ?>
|
||||||
<div class="ui four column doubling stackable grid wishlists-saved">
|
<div class="ui four column doubling stackable grid wishlists-saved">
|
||||||
<?php foreach ($user->getSavedWishlists() as $wishlist_saved) { ?>
|
<?php foreach ($wishlists as $wishlist_saved) { ?>
|
||||||
<?php
|
<?php
|
||||||
$wishlist = new Wishlist($wishlist_saved['wishlist']);
|
$wishlist = new Wishlist($wishlist_saved['wishlist']);
|
||||||
$wishlist_user = new User($wishlist_saved['user']);
|
$wishlist_user = new User($wishlist_saved['user']);
|
||||||
|
@ -38,6 +41,10 @@ $page->navigation();
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
|
<?php } else { ?>
|
||||||
|
<?= Page::info(__('Ask somebody to share their wishlist with you and hit the remember button for it to show up here!'), __('No lists')); ?>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue