|
@@ -16,20 +16,24 @@ class ConfigAdmin extends BaseAdmin
|
|
{
|
|
{
|
|
switch ($name) {
|
|
switch ($name) {
|
|
case 'edit':
|
|
case 'edit':
|
|
- return 'TemplateBundle:Template:template_edit.html.twig';
|
|
|
|
|
|
+ case 'create':
|
|
|
|
+ return 'KeaBundle:Config:get.html.twig';
|
|
break;
|
|
break;
|
|
-
|
|
|
|
|
|
+
|
|
default:
|
|
default:
|
|
return parent::getTemplate($name);
|
|
return parent::getTemplate($name);
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @param RouteCollection $collection
|
|
|
|
+ */
|
|
protected function configureRoutes(RouteCollection $collection)
|
|
protected function configureRoutes(RouteCollection $collection)
|
|
{
|
|
{
|
|
- $collection->remove('history')->remove('create');
|
|
|
|
|
|
+ $collection->remove('history');
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* @param string $action
|
|
* @param string $action
|
|
* @param Object $object
|
|
* @param Object $object
|
|
@@ -39,10 +43,10 @@ class ConfigAdmin extends BaseAdmin
|
|
public function configureActionButtons($action, $object = null)
|
|
public function configureActionButtons($action, $object = null)
|
|
{
|
|
{
|
|
$actions = parent::configureActionButtons($action, $object);
|
|
$actions = parent::configureActionButtons($action, $object);
|
|
- $actions['config_manager'] = array(
|
|
|
|
|
|
+ $actions['create'] = array(
|
|
'template' => 'KeaBundle:Config:config_manager_button.html.twig',
|
|
'template' => 'KeaBundle:Config:config_manager_button.html.twig',
|
|
);
|
|
);
|
|
-
|
|
|
|
|
|
+
|
|
return $actions;
|
|
return $actions;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -66,7 +70,6 @@ class ConfigAdmin extends BaseAdmin
|
|
$listMapper
|
|
$listMapper
|
|
->add('dhcp')
|
|
->add('dhcp')
|
|
->add('description')
|
|
->add('description')
|
|
- //->add('template')
|
|
|
|
->add('created')
|
|
->add('created')
|
|
->add('_action', null, array(
|
|
->add('_action', null, array(
|
|
'actions' => array(
|
|
'actions' => array(
|
|
@@ -85,8 +88,9 @@ class ConfigAdmin extends BaseAdmin
|
|
{
|
|
{
|
|
$formMapper
|
|
$formMapper
|
|
->add('dhcp')
|
|
->add('dhcp')
|
|
- ->add('description')
|
|
|
|
- ->add('template')
|
|
|
|
|
|
+ ->add('template', null, [
|
|
|
|
+ 'label' => false,
|
|
|
|
+ ])
|
|
;
|
|
;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -99,7 +103,10 @@ class ConfigAdmin extends BaseAdmin
|
|
->add('dhcp')
|
|
->add('dhcp')
|
|
->add('description')
|
|
->add('description')
|
|
->add('created')
|
|
->add('created')
|
|
- ->add('template', 'string', array('template' => 'TemplateBundle:CRUD:content_field.html.twig','data' => 'show'))
|
|
|
|
|
|
+ ->add('template', 'string', array(
|
|
|
|
+ 'template' => 'TemplateBundle:CRUD:content_field.html.twig',
|
|
|
|
+ 'data' => 'show',
|
|
|
|
+ ))
|
|
;
|
|
;
|
|
}
|
|
}
|
|
}
|
|
}
|