list/eventgrid: workaround for custom filtering

This commit is contained in:
Thomas Gelf 2014-11-16 00:37:58 +01:00
parent 8e9da72918
commit 87c8e58dab

View File

@ -406,7 +406,7 @@ class Monitoring_ListController extends Controller
$this->view->form = $form; $this->view->form = $form;
$orientation = $this->params->shift('vertical', 0) ? 'vertical' : 'horizontal'; $orientation = $this->params->shift('vertical', 0) ? 'vertical' : 'horizontal';
/*
$orientationBox = new SelectBox( $orientationBox = new SelectBox(
'orientation', 'orientation',
array( array(
@ -417,7 +417,7 @@ class Monitoring_ListController extends Controller
'horizontal' 'horizontal'
); );
$orientationBox->applyRequest($this->getRequest()); $orientationBox->applyRequest($this->getRequest());
*/
$query = $this->backend->select()->from( $query = $this->backend->select()->from(
'eventgrid', 'eventgrid',
array('day', $form->getValue('state')) array('day', $form->getValue('state'))
@ -426,7 +426,7 @@ class Monitoring_ListController extends Controller
$this->filterQuery($query); $this->filterQuery($query);
$this->view->summary = $query->getQuery()->fetchAll(); $this->view->summary = $query->getQuery()->fetchAll();
$this->view->column = $form->getValue('state'); $this->view->column = $form->getValue('state');
$this->view->orientationBox = $orientationBox; // $this->view->orientationBox = $orientationBox;
$this->view->orientation = $orientation; $this->view->orientation = $orientation;
} }
@ -615,7 +615,7 @@ class Monitoring_ListController extends Controller
$editor = Widget::create('filterEditor') $editor = Widget::create('filterEditor')
->setQuery($query) ->setQuery($query)
->preserveParams('limit', 'sort', 'dir', 'format', 'view', 'backend') ->preserveParams('limit', 'sort', 'dir', 'format', 'view', 'backend')
->ignoreParams('page') ->ignoreParams('page', 'objecttype', 'from', 'to', 'state', 'btn_submit')
->handleRequest($this->getRequest()); ->handleRequest($this->getRequest());
$query->applyFilter($editor->getFilter()); $query->applyFilter($editor->getFilter());