From d2de1f2eabe8d50046344f2232f5d0557b1735bb Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sun, 20 Mar 2016 12:14:48 +0100 Subject: [PATCH] ObjectController: improve clone link, rendering --- .../Director/Web/Controller/ObjectController.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/library/Director/Web/Controller/ObjectController.php b/library/Director/Web/Controller/ObjectController.php index 71a2aa16..d657b8a0 100644 --- a/library/Director/Web/Controller/ObjectController.php +++ b/library/Director/Web/Controller/ObjectController.php @@ -151,14 +151,18 @@ abstract class ObjectController extends ActionController $this->view->title = $object->object_name; $this->view->form->handleRequest(); - $this->view->actionLinks = $this->view->qlink( + $this->view->actionLinks = $this->createCloneLink(); + $this->setViewScript('object/form'); + } + + protected function createCloneLink() + { + return $this->view->qlink( $this->translate('Clone'), - 'director/' . $ltype .'/clone', - array('name' => $object->object_name), + 'director/' . $this->getType() .'/clone', + $this->object->getUrlParams(), array('class' => 'icon-paste') ); - - $this->render('object/form', null, true); } public function addAction()