diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/Template/app/filters_helper.php | 21 | ||||
-rw-r--r-- | app/Template/app/overview.php | 15 | ||||
-rw-r--r-- | app/Template/project/filters.php | 1 | ||||
-rw-r--r-- | app/Template/search/index.php | 17 |
4 files changed, 41 insertions, 13 deletions
diff --git a/app/Template/app/filters_helper.php b/app/Template/app/filters_helper.php new file mode 100644 index 00000000..17c21797 --- /dev/null +++ b/app/Template/app/filters_helper.php @@ -0,0 +1,21 @@ +<div class="dropdown filters"> + <span> + <i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('Filters') ?></a> + <ul> + <li><a href="#" class="filter-helper" data-filter="<?= isset($reset) ? $reset : '' ?>"><?= t('Reset filters') ?></a></li> + <li><a href="#" class="filter-helper" data-filter="status:open assignee:me"><?= t('My tasks') ?></a></li> + <li><a href="#" class="filter-helper" data-filter="status:open assignee:me due:tomorrow"><?= t('My tasks due tomorrow') ?></a></li> + <li><a href="#" class="filter-helper" data-filter="due:today"><?= t('Tasks due today') ?></a></li> + <li><a href="#" class="filter-helper" data-filter="due:tomorrow"><?= t('Tasks due tomorrow') ?></a></li> + <li><a href="#" class="filter-helper" data-filter="due:yesterday"><?= t('Tasks due yesterday') ?></a></li> + <li><a href="#" class="filter-helper" data-filter="status:closed"><?= t('Closed tasks') ?></a></li> + <li><a href="#" class="filter-helper" data-filter="status:open"><?= t('Open tasks') ?></a></li> + <li><a href="#" class="filter-helper" data-filter="assignee:nobody"><?= t('Not assigned') ?></a></li> + <li><a href="#" class="filter-helper" data-filter="category:none"><?= t('No category') ?></a></li> + <li> + <i class="fa fa-external-link"></i> + <a href="http://kanboard.net/documentation/search" target="_blank"><?= t('View advanced search syntax') ?></a> + </li> + </ul> + </span> +</div>
\ No newline at end of file diff --git a/app/Template/app/overview.php b/app/Template/app/overview.php index 66bcaa63..fa7866af 100644 --- a/app/Template/app/overview.php +++ b/app/Template/app/overview.php @@ -1,9 +1,12 @@ -<form method="get" action="?" autocomplete="off"> - <?= $this->form->hidden('controller', array('controller' => 'search')) ?> - <?= $this->form->hidden('action', array('controller' => 'index')) ?> - <?= $this->form->text('search', array(), array(), array('placeholder="'.t('Search').'"'), 'form-input-large') ?> - <input type="submit" value="<?= t('Search') ?>" class="btn btn-blue"/> -</form> +<div class="search"> + <form method="get" action="?" class="search"> + <?= $this->form->hidden('controller', array('controller' => 'search')) ?> + <?= $this->form->hidden('action', array('controller' => 'index')) ?> + <?= $this->form->text('search', array(), array(), array('placeholder="'.t('Search').'"'), 'form-input-large') ?> + </form> + + <?= $this->render('app/filters_helper') ?> +</div> <?= $this->render('app/projects', array('paginator' => $project_paginator)) ?> <?= $this->render('app/tasks', array('paginator' => $task_paginator)) ?> diff --git a/app/Template/project/filters.php b/app/Template/project/filters.php index d86de2a7..90ad429b 100644 --- a/app/Template/project/filters.php +++ b/app/Template/project/filters.php @@ -45,4 +45,5 @@ <?= $this->form->hidden('action', $filters) ?> <?= $this->form->text('search', $filters, array(), array('placeholder="'.t('Filter').'"'), 'form-input-large') ?> </form> + <?= $this->render('app/filters_helper', array('reset' => 'status:open')) ?> </div>
\ No newline at end of file diff --git a/app/Template/search/index.php b/app/Template/search/index.php index 0c156bfd..4d7f5ed3 100644 --- a/app/Template/search/index.php +++ b/app/Template/search/index.php @@ -8,12 +8,15 @@ </ul> </div> - <form method="get" action="?" autocomplete="off"> - <?= $this->form->hidden('controller', $values) ?> - <?= $this->form->hidden('action', $values) ?> - <?= $this->form->text('search', $values, array(), array(empty($values['search']) ? 'autofocus' : '', 'required', 'placeholder="'.t('Search').'"'), 'form-input-large') ?> - <input type="submit" value="<?= t('Search') ?>" class="btn btn-blue"/> - </form> + <div class="search"> + <form method="get" action="?" class="search"> + <?= $this->form->hidden('controller', $values) ?> + <?= $this->form->hidden('action', $values) ?> + <?= $this->form->text('search', $values, array(), array(empty($values['search']) ? 'autofocus' : '', 'placeholder="'.t('Search').'"'), 'form-input-large') ?> + </form> + + <?= $this->render('app/filters_helper') ?> + </div> <?php if (empty($values['search'])): ?> <div class="listing"> @@ -28,7 +31,7 @@ <li><?= t('Search by description: ') ?><strong>description:"Something to find"</strong></li> <li><?= t('Search by due date: ') ?><strong>due:2015-07-01</strong></li> </ul> - <p><a href="http://kanboard.net/documentation/search" target="_blank"><?= t('More examples in the documentation') ?></a></p> + <p><i class="fa fa-external-link fa-fw"></i><a href="http://kanboard.net/documentation/search" target="_blank"><?= t('More examples in the documentation') ?></a></p> </div> <?php elseif (! empty($values['search']) && $paginator->isEmpty()): ?> <p class="alert"><?= t('Nothing found.') ?></p> |