From cd989f9c3aff968e19a3aeabc4eb9085787a6673 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 14:43:12 +0200 Subject: Adding upstream version 1.10.2. Signed-off-by: Daniel Baumann --- .../Web/ActionBar/AutomationObjectActionBar.php | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 library/Director/Web/ActionBar/AutomationObjectActionBar.php (limited to 'library/Director/Web/ActionBar/AutomationObjectActionBar.php') diff --git a/library/Director/Web/ActionBar/AutomationObjectActionBar.php b/library/Director/Web/ActionBar/AutomationObjectActionBar.php new file mode 100644 index 0000000..247677f --- /dev/null +++ b/library/Director/Web/ActionBar/AutomationObjectActionBar.php @@ -0,0 +1,65 @@ +request = $request; + } + + protected function assemble() + { + $request = $this->request; + $action = $request->getActionName(); + $controller = $request->getControllerName(); + $params = ['id' => $request->getParam('id')]; + $links = [ + 'index' => Link::create( + $this->translate('Overview'), + "director/$controller", + $params, + ['class' => 'icon-info'] + ), + 'edit' => Link::create( + $this->translate('Modify'), + "director/$controller/edit", + $params, + ['class' => 'icon-edit'] + ), + 'clone' => Link::create( + $this->translate('Clone'), + "director/$controller/clone", + $params, + ['class' => 'icon-paste'] + ), + /* + // TODO: enable once handled in the controller + 'export' => Link::create( + $this->translate('Download JSON'), + $this->request->getUrl()->with('format', 'json'), + null, + [ + 'data-base-target' => '_blank', + ] + ) + */ + + ]; + unset($links[$action]); + $this->add($links); + } +} -- cgit v1.2.3