ObjectController: add fields action

This commit is contained in:
Thomas Gelf 2015-08-02 15:01:47 +02:00
parent 591e816638
commit 94e777a390
1 changed files with 26 additions and 0 deletions

View File

@ -128,6 +128,32 @@ abstract class ObjectController extends ActionController
$this->render('object/form', null, true);
}
public function fieldsAction()
{
$object = $this->object;
$type = $this->getType();
$this->getTabs()->activate('fields');
$title = $this->translate('%s template "%s": custom fields');
$this->view->title = sprintf(
$title,
$this->translate(ucfirst($type)),
$object->object_name
);
$this->view->form = $this
->loadForm('icingaObjectField')
->setDb($this->db)
->setIcingaObject($object)
->handleRequest();
$this->view->table = $this
->loadTable('icingaObjectDatafield')
->setObject($object);
$this->render('object/fields', null, true);
}
public function historyAction()
{
$type = $this->getType();