Improve wishlist filter

This commit is contained in:
Jay Trees 2022-04-08 12:41:00 +02:00
parent 32592a315f
commit 0453e84836
2 changed files with 44 additions and 40 deletions

View file

@ -87,22 +87,21 @@ class Wishlist
/** /**
* Cards * Cards
*/ */
if (!empty($this->wishes)) { ?> ?>
<div class="ui three column doubling stackable grid"> <div class="ui three column doubling stackable grid">
<?php if (!empty($this->wishes)) { ?>
<?php foreach ($this->wishes as $wish) { ?> <?php foreach ($this->wishes as $wish) { ?>
<div class="column"> <div class="column">
<?= $wish->getCard($this->user) ?> <?= $wish->getCard($this->user) ?>
</div> </div>
<?php } ?> <?php } ?>
</div>
<?php } else { ?> <?php } else { ?>
<div class="ui container">
<div class="sixteen wide column"> <div class="sixteen wide column">
<?= Page::info('This wishlist seems to be empty.', 'Empty'); ?> <?= Page::info('This wishlist seems to be empty.', 'Empty'); ?>
</div> </div>
<?php } ?>
</div> </div>
<?php <?php
}
$html = ob_get_clean(); $html = ob_get_clean();

View file

@ -11,6 +11,9 @@ $scriptPart = '/src/assets/js/parts/wishlist-filter.js';
<script defer src="/src/assets/js/parts/wishlist-filter.js?m=<?= filemtime(ROOT . $scriptPart) ?>"></script> <script defer src="/src/assets/js/parts/wishlist-filter.js?m=<?= filemtime(ROOT . $scriptPart) ?>"></script>
<div> <div>
<div class="ui stackable grid">
<div class="column">
<div class="ui small labeled icon basic white button floating dropdown filter priority"> <div class="ui small labeled icon basic white button floating dropdown filter priority">
<input type="hidden" name="filters" /> <input type="hidden" name="filters" />
@ -50,5 +53,7 @@ $scriptPart = '/src/assets/js/parts/wishlist-filter.js';
</div> </div>
</div> </div>
</div> </div>
</div>
</div>
</div> </div>
<br />