diff --git a/client/res/templates/record/list-tree.tpl b/client/res/templates/record/list-tree.tpl
index bbb73ad0b7..12376d98f7 100644
--- a/client/res/templates/record/list-tree.tpl
+++ b/client/res/templates/record/list-tree.tpl
@@ -15,14 +15,27 @@
{{/if}}
{{/unless}}
-
- {{#if hasExpandedToggler}}
-
-
- {{/if}}
-
- {{#if showEditLink}}
-
+ {{#if showRootMenu}}
+
{{/if}}
{{#if showRoot}}
diff --git a/client/src/views/record/list-tree.js b/client/src/views/record/list-tree.js
index 8e793f7446..38544552ea 100644
--- a/client/src/views/record/list-tree.js
+++ b/client/src/views/record/list-tree.js
@@ -81,6 +81,10 @@ Espo.define('views/record/list-tree', 'views/record/list', function (Dep) {
data.isExpanded = this.isExpanded;
}
+ if (data.hasExpandedToggler || this.showEditLink) {
+ data.showRootMenu = true;
+ }
+
return data;
},
@@ -268,4 +272,3 @@ Espo.define('views/record/list-tree', 'views/record/list', function (Dep) {
});
});
-
diff --git a/frontend/less/espo/custom.less b/frontend/less/espo/custom.less
index d3d9701b09..c8bff1f175 100644
--- a/frontend/less/espo/custom.less
+++ b/frontend/less/espo/custom.less
@@ -2194,13 +2194,6 @@ pre > code {
}
.categories-container {
- a.manage-categories-link {
- margin-left: 8px;
- }
- a.category-expanded-toggle-link {
- margin-left: 8px;
- }
-
> .list > .list-group-tree > li {
padding-left: 0;
}