Allow filtering of events in index view
This commit is contained in:
parent
040094e984
commit
648252cf50
|
@ -22,6 +22,9 @@ class EventsController extends AppController {
|
||||||
*/
|
*/
|
||||||
public function index() {
|
public function index() {
|
||||||
$this->Event->recursive = -1;
|
$this->Event->recursive = -1;
|
||||||
|
$this->FilterComponent = $this->Components->load('Filter');
|
||||||
|
|
||||||
|
$conditions = $this->FilterComponent->buildFilter($this->request->params['named']);
|
||||||
|
|
||||||
// How many events to return
|
// How many events to return
|
||||||
$this->loadModel('Config');
|
$this->loadModel('Config');
|
||||||
|
@ -32,7 +35,8 @@ class EventsController extends AppController {
|
||||||
$this->Paginator->settings = array(
|
$this->Paginator->settings = array(
|
||||||
'limit' => $limit['ZM_WEB_EVENTS_PER_PAGE'],
|
'limit' => $limit['ZM_WEB_EVENTS_PER_PAGE'],
|
||||||
'order' => array('StartTime', 'MaxScore'),
|
'order' => array('StartTime', 'MaxScore'),
|
||||||
'paramType' => 'querystring'
|
'paramType' => 'querystring',
|
||||||
|
'conditions' => $conditions
|
||||||
);
|
);
|
||||||
$events = $this->Paginator->paginate('Event');
|
$events = $this->Paginator->paginate('Event');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue