Fix event grid layout and forms

Make event grid horizontal, user build in form apply button, add linebreak between filter and grid
This commit is contained in:
Matthias Jentsch 2014-11-13 18:40:13 +01:00
parent 022d89254f
commit 0db5167a35
3 changed files with 13 additions and 12 deletions

View File

@ -18,6 +18,7 @@ use Icinga\Data\Filter\Filter;
use Icinga\Web\Widget;
use Icinga\Module\Monitoring\Web\Widget\SelectBox;
use Icinga\Module\Monitoring\Form\StatehistoryForm;
use Icinga\Module\Monitoring\Form\EventOverviewForm;
class Monitoring_ListController extends Controller
{
@ -392,7 +393,7 @@ class Monitoring_ListController extends Controller
$form->render();
$this->view->form = $form;
$orientation = $this->params->shift('horizontal', 0) ? 'horizontal' : 'vertical';
$orientation = $this->params->shift('vertical', 0) ? 'vertical' : 'horizontal';
$orientationBox = new SelectBox(
'orientation',

View File

@ -13,6 +13,15 @@ use Icinga\Data\Filter\Filter;
*/
class StatehistoryForm extends Form
{
/**
* Initialize this form
*/
public function init()
{
$this->setName('form_event_overview');
$this->setSubmitLabel(mt('monitoring', 'Apply'));
}
/**
* Return the corresponding filter-object
*
@ -135,16 +144,5 @@ class StatehistoryForm extends Form
)
);
}
$this->addElement(
'button',
'btn_submit',
array(
'type' => 'submit',
'escape' => false,
'value' => '1',
'class' => 'btn btn-cta btn-common',
'label' => mt('monitoring', 'Apply')
)
);
}
}

View File

@ -4,6 +4,8 @@
<div style="margin: 1em" class="dontprint">
<?= $this->translate('Sort by'); ?> <?= $this->sortControl->render($this); ?>
</div>
<?= $form ?>
<br />
<?= $this->widget('limiter', array('url' => $this->url, 'max' => $this->history->count())); ?>
<?= $this->paginationControl($history, null, null, array('preserve' => $this->preserve)); ?>
</div>