object: add clone link
This commit is contained in:
parent
7da9e0e0e1
commit
6466e3392e
|
@ -4,5 +4,6 @@
|
|||
</div>
|
||||
|
||||
<div class="content">
|
||||
<?= $this->actionLinks ?>
|
||||
<?= $this->form ?>
|
||||
</div>
|
||||
|
|
|
@ -127,6 +127,12 @@ abstract class ObjectController extends ActionController
|
|||
$this->view->title = sprintf($title, ucfirst($ltype));
|
||||
$this->view->form->handleRequest();
|
||||
|
||||
$this->view->actionLinks = $this->view->qlink(
|
||||
sprintf($this->translate('Clone'), $this->translate(ucfirst($ltype))),
|
||||
'director/' . $ltype .'/clone',
|
||||
array('name' => $object->object_name)
|
||||
);
|
||||
|
||||
$this->render('object/form', null, true);
|
||||
}
|
||||
|
||||
|
@ -156,6 +162,7 @@ abstract class ObjectController extends ActionController
|
|||
public function cloneAction()
|
||||
{
|
||||
$type = $this->getType();
|
||||
$ltype = strtolower($type);
|
||||
$this->getTabs()->activate('modify');
|
||||
|
||||
$this->view->form = $form = $this->loadForm(
|
||||
|
@ -167,6 +174,13 @@ abstract class ObjectController extends ActionController
|
|||
ucfirst($type)
|
||||
);
|
||||
$this->view->form->handleRequest();
|
||||
|
||||
$this->view->actionLinks = $this->view->qlink(
|
||||
sprintf($this->translate('<- back'), $this->translate(ucfirst($ltype))),
|
||||
'director/' . $ltype,
|
||||
array('name' => $this->object->object_name)
|
||||
);
|
||||
|
||||
$this->render('object/form', null, true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue