DataList: Add edit and add methods
This commit is contained in:
parent
cfbe065b86
commit
a594116fe5
|
@ -4,11 +4,21 @@ use Icinga\Module\Director\Web\Controller\ActionController;
|
|||
|
||||
class Director_DatalistController extends ActionController
|
||||
{
|
||||
public function addAction()
|
||||
{
|
||||
$this->forward('index', 'datalist', 'director');
|
||||
}
|
||||
|
||||
public function editAction()
|
||||
{
|
||||
$this->forward('index', 'datalist', 'director');
|
||||
}
|
||||
|
||||
public function indexAction()
|
||||
{
|
||||
$this->view->title = $this->translate('Add list');
|
||||
$this->getTabs()->add('addlist', array(
|
||||
'url' => 'director/data/addlist',
|
||||
'url' => 'director/datalist/add',
|
||||
'label' => $this->view->title,
|
||||
))->activate('addlist');
|
||||
|
||||
|
@ -19,6 +29,7 @@ class Director_DatalistController extends ActionController
|
|||
if ($id = $this->params->get('id')) {
|
||||
$form->loadObject($id);
|
||||
}
|
||||
|
||||
$form->handleRequest();
|
||||
|
||||
$this->render('object/form', null, true);
|
||||
|
|
|
@ -17,7 +17,7 @@ class DatalistTable extends QuickTable
|
|||
|
||||
protected function getActionUrl($row)
|
||||
{
|
||||
return $this->url('director/datalist', array('id' => $row->id));
|
||||
return $this->url('director/datalist/edit', array('id' => $row->id));
|
||||
}
|
||||
|
||||
public function getTitles()
|
||||
|
|
Loading…
Reference in New Issue