Added search in activity stream
This commit is contained in:
14
app/Template/activity/filter_dropdown.php
Normal file
14
app/Template/activity/filter_dropdown.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<div class="dropdown">
|
||||
<a href="#" class="dropdown-menu dropdown-menu-link-icon" title="<?= t('Default filters') ?>"><i class="fa fa-filter fa-fw"></i><i class="fa fa-caret-down"></i></a>
|
||||
<ul>
|
||||
<li><a href="#" class="filter-helper filter-reset" data-filter="" title="<?= t('Keyboard shortcut: "%s"', 'r') ?>"><?= t('Reset filters') ?></a></li>
|
||||
<li><a href="#" class="filter-helper" data-filter="creator:me"><?= t('My activities') ?></a></li>
|
||||
<li><a href="#" class="filter-helper" data-filter="created:<=<?= date('Y-m-d', strtotime('yesterday')) ?>"><?= t('Activity until yesterday') ?></a></li>
|
||||
<li><a href="#" class="filter-helper" data-filter="created:<=<?= date('Y-m-d')?>"><?= t('Activity until today') ?></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>
|
||||
<?= $this->url->doc(t('View advanced search syntax'), 'search') ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
39
app/Template/search/activity.php
Normal file
39
app/Template/search/activity.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<section id="main">
|
||||
<div class="page-header">
|
||||
<ul>
|
||||
<li>
|
||||
<i class="fa fa-search fa-fw"></i>
|
||||
<?= $this->url->link(t('Search tasks'), 'search', 'index') ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="filter-box">
|
||||
<form method="get" action="<?= $this->url->dir() ?>" 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') ?>
|
||||
<?= $this->render('activity/filter_dropdown') ?>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php if (empty($values['search'])): ?>
|
||||
<div class="listing">
|
||||
<h3><?= t('Advanced search') ?></h3>
|
||||
<p><?= t('Example of query: ') ?><strong>project:"My project" creator:me</strong></p>
|
||||
<ul>
|
||||
<li><?= t('Search by project: ') ?><strong>project:"My project"</strong></li>
|
||||
<li><?= t('Search by creator: ') ?><strong>creator:admin</strong></li>
|
||||
<li><?= t('Search by creation date: ') ?><strong>created:today</strong></li>
|
||||
<li><?= t('Search by task status: ') ?><strong>status:open</strong></li>
|
||||
<li><?= t('Search by task title: ') ?><strong>title:"My task"</strong></li>
|
||||
</ul>
|
||||
<p><i class="fa fa-external-link fa-fw"></i><?= $this->url->doc(t('View advanced search syntax'), 'search') ?></p>
|
||||
</div>
|
||||
<?php elseif (! empty($values['search']) && $nb_events === 0): ?>
|
||||
<p class="alert"><?= t('Nothing found.') ?></p>
|
||||
<?php else: ?>
|
||||
<?= $this->render('event/events', array('events' => $events)) ?>
|
||||
<?php endif ?>
|
||||
|
||||
</section>
|
||||
@@ -2,8 +2,8 @@
|
||||
<div class="page-header">
|
||||
<ul>
|
||||
<li>
|
||||
<i class="fa fa-folder fa-fw"></i>
|
||||
<?= $this->url->link(t('All projects'), 'project', 'index') ?>
|
||||
<i class="fa fa-search fa-fw"></i>
|
||||
<?= $this->url->link(t('Activity stream search'), 'search', 'activity') ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user