Added search in activity stream

This commit is contained in:
Frederic Guillot
2016-04-10 15:18:20 -04:00
parent 2eadfb2291
commit 9f0166502b
54 changed files with 1066 additions and 110 deletions

View File

@@ -46,4 +46,22 @@ class Search extends Base
'title' => t('Search tasks').($nb_tasks > 0 ? ' ('.$nb_tasks.')' : '')
)));
}
public function activity()
{
$search = urldecode($this->request->getStringParam('search'));
$events = $this->helper->projectActivity->searchEvents($search);
$nb_events = count($events);
$this->response->html($this->helper->layout->app('search/activity', array(
'values' => array(
'search' => $search,
'controller' => 'search',
'action' => 'activity',
),
'title' => t('Search in activity stream').($nb_events > 0 ? ' ('.$nb_events.')' : ''),
'nb_events' => $nb_events,
'events' => $events,
)));
}
}