From b5bef88a8dde8089126813e22d70ca3fe5a68833 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Tue, 8 Mar 2022 09:27:30 +0200 Subject: [PATCH] category disable children link --- .../Core/Templates/Metadata/CategoryTree/clientDefs.json | 6 ++++++ .../Crm/Resources/metadata/clientDefs/DocumentFolder.json | 6 ++++++ .../metadata/clientDefs/KnowledgeBaseCategory.json | 6 ++++++ .../metadata/clientDefs/EmailTemplateCategory.json | 4 ++++ application/Espo/Services/RecordTree.php | 4 ++++ 5 files changed, 26 insertions(+) diff --git a/application/Espo/Core/Templates/Metadata/CategoryTree/clientDefs.json b/application/Espo/Core/Templates/Metadata/CategoryTree/clientDefs.json index a0ff48f7d1..7affbef26c 100644 --- a/application/Espo/Core/Templates/Metadata/CategoryTree/clientDefs.json +++ b/application/Espo/Core/Templates/Metadata/CategoryTree/clientDefs.json @@ -22,5 +22,11 @@ } ] } + }, + "relationshipPanels": { + "children": { + "selectDisabled": true, + "unlinkDisabled": true + } } } \ No newline at end of file diff --git a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/DocumentFolder.json b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/DocumentFolder.json index 895f1f52b8..3a83ca80ac 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/DocumentFolder.json +++ b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/DocumentFolder.json @@ -36,5 +36,11 @@ } ] } + }, + "relationshipPanels": { + "children": { + "selectDisabled": true, + "unlinkDisabled": true + } } } \ No newline at end of file diff --git a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/KnowledgeBaseCategory.json b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/KnowledgeBaseCategory.json index 8ee5ab2669..5bcd6de3fb 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/KnowledgeBaseCategory.json +++ b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/KnowledgeBaseCategory.json @@ -36,5 +36,11 @@ } ] } + }, + "relationshipPanels": { + "children": { + "selectDisabled": true, + "unlinkDisabled": true + } } } \ No newline at end of file diff --git a/application/Espo/Resources/metadata/clientDefs/EmailTemplateCategory.json b/application/Espo/Resources/metadata/clientDefs/EmailTemplateCategory.json index 4a90b56254..3b6b32e282 100644 --- a/application/Espo/Resources/metadata/clientDefs/EmailTemplateCategory.json +++ b/application/Espo/Resources/metadata/clientDefs/EmailTemplateCategory.json @@ -40,6 +40,10 @@ "relationshipPanels": { "emailTemplates": { "create": false + }, + "children": { + "selectDisabled": true, + "unlinkDisabled": true } } } \ No newline at end of file diff --git a/application/Espo/Services/RecordTree.php b/application/Espo/Services/RecordTree.php index 076aece562..382dcbdf49 100644 --- a/application/Espo/Services/RecordTree.php +++ b/application/Espo/Services/RecordTree.php @@ -69,6 +69,8 @@ class RecordTree extends Record if ($this->entityType === 'RecordTree') { $this->entityType = null; } + + $this->readOnlyLinkList[] = 'children'; } public function setEntityType(string $entityType): void @@ -384,4 +386,6 @@ class RecordTree extends Record return $idList; } + + }