summaryrefslogtreecommitdiff
path: root/app/Template/project_header/search.php
blob: 2b2a2c39e43e95913b7c1328721612d1fdb43bf2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<div class="filter-box">
    <form method="get" action="<?= $this->url->dir() ?>" class="search">
        <?= $this->form->hidden('controller', $filters) ?>
        <?= $this->form->hidden('action', $filters) ?>
        <?= $this->form->hidden('project_id', $filters) ?>
        <?= $this->form->text('search', $filters, array(), array('placeholder="'.t('Filter').'"')) ?>

        <?= $this->render('app/filters_helper', array('reset' => 'status:open', 'project' => $project)) ?>

        <?php if (isset($custom_filters_list) && ! empty($custom_filters_list)): ?>
        <div class="dropdown">
            <a href="#" class="dropdown-menu dropdown-menu-link-icon" title="<?= t('Custom filters') ?>"><i class="fa fa-bookmark fa-fw"></i><i class="fa fa-caret-down"></i></a>
            <ul>
                <?php foreach ($custom_filters_list as $filter): ?>
                    <li><a href="#" class="filter-helper" data-<?php if ($filter['append']): ?><?= 'append-' ?><?php endif ?>filter='<?= $this->e($filter['filter']) ?>'><?= $this->e($filter['name']) ?></a></li>
                <?php endforeach ?>
            </ul>
        </div>
        <?php endif ?>

        <?php if (isset($users_list)): ?>
        <div class="dropdown">
            <a href="#" class="dropdown-menu dropdown-menu-link-icon" title="<?= t('User filters') ?>"><i class="fa fa-users fa-fw"></i> <i class="fa fa-caret-down"></i></a>
            <ul>
                <li><a href="#" class="filter-helper" data-append-filter="assignee:nobody"><?= t('Not assigned') ?></a></li>
                <?php foreach ($users_list as $user): ?>
                    <li><a href="#" class="filter-helper" data-append-filter='assignee:"<?= $this->e($user) ?>"'><?= $this->e($user) ?></a></li>
                <?php endforeach ?>
            </ul>
        </div>
        <?php endif ?>

        <?php if (isset($categories_list) && ! empty($categories_list)): ?>
        <div class="dropdown">
            <a href="#" class="dropdown-menu dropdown-menu-link-icon" title="<?= t('Category filters') ?>"><i class="fa fa-tags fa-fw"></i><i class="fa fa-caret-down"></i></a>
            <ul>
                <li><a href="#" class="filter-helper" data-append-filter="category:none"><?= t('No category') ?></a></li>
                <?php foreach ($categories_list as $category): ?>
                    <li><a href="#" class="filter-helper" data-append-filter='category:"<?= $this->e($category) ?>"'><?= $this->e($category) ?></a></li>
                <?php endforeach ?>
            </ul>
        </div>
        <?php endif ?>
    </form>
</div>