|
@@ -51,6 +51,9 @@ class TemplateAdmin extends BaseAdmin
|
|
'actions' => array(
|
|
'actions' => array(
|
|
'show' => array(),
|
|
'show' => array(),
|
|
'edit' => array(),
|
|
'edit' => array(),
|
|
|
|
+ 'clone' => array(
|
|
|
|
+ 'template' => '@BaseAdmin/CRUD/list__action_clone.html.twig'
|
|
|
|
+ ),
|
|
'delete' => array(),
|
|
'delete' => array(),
|
|
)
|
|
)
|
|
));
|
|
));
|
|
@@ -77,5 +80,23 @@ class TemplateAdmin extends BaseAdmin
|
|
'template' => 'TemplateBundle:Template:show_template.html.twig',
|
|
'template' => 'TemplateBundle:Template:show_template.html.twig',
|
|
));
|
|
));
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * @param string $action
|
|
|
|
+ * @param Template $object
|
|
|
|
+ *
|
|
|
|
+ * @return array
|
|
|
|
+ */
|
|
|
|
+ public function getActionButtons($action, $object = null)
|
|
|
|
+ {
|
|
|
|
+ $actions = parent::getActionButtons($action, $object);
|
|
|
|
+ if ($this->isCurrentRoute('show')) {
|
|
|
|
+ $actions['clone'] = [
|
|
|
|
+ 'template' => '@BaseAdmin/CRUD/show__action_clone.html.twig',
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return $actions;
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|