diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-08-08 21:54:45 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-08-08 21:54:45 -0400 |
commit | 195fae86d663c81cc3faa7653d1b7fe8cd6a27ce (patch) | |
tree | 6262651f765b8fe9a921090c5d344814a66a6674 /app/Template/project_header/search.php | |
parent | fd0bea2187b33e2e90296882dc2e03c2557d65e9 (diff) |
Make filter box and project header more responsive
Diffstat (limited to 'app/Template/project_header/search.php')
-rw-r--r-- | app/Template/project_header/search.php | 77 |
1 files changed, 44 insertions, 33 deletions
diff --git a/app/Template/project_header/search.php b/app/Template/project_header/search.php index 8885d9c9..512e88d7 100644 --- a/app/Template/project_header/search.php +++ b/app/Template/project_header/search.php @@ -3,43 +3,54 @@ <?= $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)) ?> + <div class="input-addon"> + <?= $this->form->text('search', $filters, array(), array('placeholder="'.t('Filter').'"'), 'input-addon-field') ?> + <div class="input-addon-item"> + <?= $this->render('app/filters_helper', array('reset' => 'status:open', 'project' => $project)) ?> + </div> - <?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->text->e($filter['filter']) ?>'><?= $this->text->e($filter['name']) ?></a></li> - <?php endforeach ?> - </ul> - </div> - <?php endif ?> + <?php if (isset($custom_filters_list) && ! empty($custom_filters_list)): ?> + <div class="input-addon-item"> + <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->text->e($filter['filter']) ?>'><?= $this->text->e($filter['name']) ?></a></li> + <?php endforeach ?> + </ul> + </div> + </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-unique-filter="assignee:nobody"><?= t('Not assigned') ?></a></li> - <?php foreach ($users_list as $user): ?> - <li><a href="#" class="filter-helper" data-unique-filter='assignee:"<?= $this->text->e($user) ?>"'><?= $this->text->e($user) ?></a></li> - <?php endforeach ?> - </ul> - </div> - <?php endif ?> + <?php if (isset($users_list)): ?> + <div class="input-addon-item"> + <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-unique-filter="assignee:nobody"><?= t('Not assigned') ?></a></li> + <?php foreach ($users_list as $user): ?> + <li><a href="#" class="filter-helper" data-unique-filter='assignee:"<?= $this->text->e($user) ?>"'><?= $this->text->e($user) ?></a></li> + <?php endforeach ?> + </ul> + </div> + </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-unique-filter="category:none"><?= t('No category') ?></a></li> - <?php foreach ($categories_list as $category): ?> - <li><a href="#" class="filter-helper" data-unique-filter='category:"<?= $this->text->e($category) ?>"'><?= $this->text->e($category) ?></a></li> - <?php endforeach ?> - </ul> + <?php if (isset($categories_list) && ! empty($categories_list)): ?> + <div class="input-addon-item"> + <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-unique-filter="category:none"><?= t('No category') ?></a></li> + <?php foreach ($categories_list as $category): ?> + <li><a href="#" class="filter-helper" data-unique-filter='category:"<?= $this->text->e($category) ?>"'><?= $this->text->e($category) ?></a></li> + <?php endforeach ?> + </ul> + </div> + </div> + <?php endif ?> </div> - <?php endif ?> + </form> </div> |