From 6a0e373a565aeac4833b8761d5a9cded77feb92a Mon Sep 17 00:00:00 2001 From: raviks789 <33730024+raviks789@users.noreply.github.com> Date: Thu, 1 Sep 2022 12:46:58 +0200 Subject: [PATCH] Show the delete/cancel icon only for the imported node Imported nodes will not have edit icon on their node tile. Hence, it is required to show the delete icon in their node tile. As the other nodes will have edit icon and their edit forms contain the delete button, it is not necessary to show the delete/cancel icon in their node tiles. --- application/forms/ProcessForm.php | 9 --------- .../Businessprocess/Renderer/TileRenderer/NodeTile.php | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/application/forms/ProcessForm.php b/application/forms/ProcessForm.php index 0ef09f79..c901dcb6 100644 --- a/application/forms/ProcessForm.php +++ b/application/forms/ProcessForm.php @@ -169,15 +169,6 @@ protected function onRequest() $this->redirectAndExit($url); } - protected function getNode(BpConfig $bp, $nodeName) - { - if ($nodeName) { - return $bp->getNode($nodeName); - } else { - return null; - } - } - public function onSuccess() { $changes = ProcessChanges::construct($this->bp, $this->session); diff --git a/library/Businessprocess/Renderer/TileRenderer/NodeTile.php b/library/Businessprocess/Renderer/TileRenderer/NodeTile.php index 67bb4a62..b8c7432e 100644 --- a/library/Businessprocess/Renderer/TileRenderer/NodeTile.php +++ b/library/Businessprocess/Renderer/TileRenderer/NodeTile.php @@ -338,7 +338,7 @@ protected function addActionLinks() } } - if ($this->renderer->getBusinessProcess()->getMetadata()->canModify()) { + if ($this->renderer->getBusinessProcess()->getMetadata()->canModify() && $this->node instanceof ImportedNode) { $params = array( 'action' => 'delete', 'deletenode' => $this->node->getName(),