Improve wishlist filter
This commit is contained in:
parent
32592a315f
commit
0453e84836
2 changed files with 44 additions and 40 deletions
|
@ -87,22 +87,21 @@ class Wishlist
|
|||
/**
|
||||
* 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) { ?>
|
||||
<div class="column">
|
||||
<?= $wish->getCard($this->user) ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<div class="ui container">
|
||||
<?php } else { ?>
|
||||
<div class="sixteen wide column">
|
||||
<?= Page::info('This wishlist seems to be empty.', 'Empty'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
$html = ob_get_clean();
|
||||
|
||||
|
|
|
@ -11,44 +11,49 @@ $scriptPart = '/src/assets/js/parts/wishlist-filter.js';
|
|||
<script defer src="/src/assets/js/parts/wishlist-filter.js?m=<?= filemtime(ROOT . $scriptPart) ?>"></script>
|
||||
|
||||
<div>
|
||||
<div class="ui small labeled icon basic white button floating dropdown filter priority">
|
||||
<input type="hidden" name="filters" />
|
||||
<div class="ui stackable grid">
|
||||
<div class="column">
|
||||
|
||||
<i class="filter icon"></i>
|
||||
<span class="text"><?= __('Filter priorities') ?></span>
|
||||
<div class="ui small labeled icon basic white button floating dropdown filter priority">
|
||||
<input type="hidden" name="filters" />
|
||||
|
||||
<div class="menu">
|
||||
<div class="ui icon search input">
|
||||
<i class="search icon"></i>
|
||||
<input type="text" placeholder="<?= __('Search priorities') ?>" />
|
||||
</div>
|
||||
|
||||
<div class="divider"></div>
|
||||
|
||||
<div class="header">
|
||||
<i class="filter icon"></i>
|
||||
<?= __('Priorities') ?>
|
||||
</div>
|
||||
<span class="text"><?= __('Filter priorities') ?></span>
|
||||
|
||||
<div class="scrolling menu">
|
||||
<div class="item" data-value="-1">
|
||||
<i class="small circle icon"></i>
|
||||
<?= __('All priorities') ?>
|
||||
</div>
|
||||
|
||||
<div class="item" data-value="">
|
||||
<i class="small circle outline icon"></i>
|
||||
<?= __('No priority') ?>
|
||||
</div>
|
||||
|
||||
<?php foreach (Wish::$priorities as $number => $priority) { ?>
|
||||
<div class="item" data-value="<?= $number ?>">
|
||||
<i class="small <?= $priority['color'] ?> circle icon"></i>
|
||||
<?= $priority['name'] ?>
|
||||
<div class="menu">
|
||||
<div class="ui icon search input">
|
||||
<i class="search icon"></i>
|
||||
<input type="text" placeholder="<?= __('Search priorities') ?>" />
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="divider"></div>
|
||||
|
||||
<div class="header">
|
||||
<i class="filter icon"></i>
|
||||
<?= __('Priorities') ?>
|
||||
</div>
|
||||
|
||||
<div class="scrolling menu">
|
||||
<div class="item" data-value="-1">
|
||||
<i class="small circle icon"></i>
|
||||
<?= __('All priorities') ?>
|
||||
</div>
|
||||
|
||||
<div class="item" data-value="">
|
||||
<i class="small circle outline icon"></i>
|
||||
<?= __('No priority') ?>
|
||||
</div>
|
||||
|
||||
<?php foreach (Wish::$priorities as $number => $priority) { ?>
|
||||
<div class="item" data-value="<?= $number ?>">
|
||||
<i class="small <?= $priority['color'] ?> circle icon"></i>
|
||||
<?= $priority['name'] ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
|
Loading…
Reference in a new issue