From 0df52260aab7c33586070b29a657e322fa4b0fcb 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 fa2fa57c..856662a5 100644 --- a/application/forms/ProcessForm.php +++ b/application/forms/ProcessForm.php @@ -160,15 +160,6 @@ protected function onRequest() } } - 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(),