diff --git a/application/Espo/Resources/metadata/app/adminPanel.json b/application/Espo/Resources/metadata/app/adminPanel.json
index e09c68b9d1..15555ff8b8 100644
--- a/application/Espo/Resources/metadata/app/adminPanel.json
+++ b/application/Espo/Resources/metadata/app/adminPanel.json
@@ -1,7 +1,7 @@
{
- "system":{
- "label":"System",
- "items":[
+ "system": {
+ "label": "System",
+ "itemList": [
{
"url":"#Admin/settings",
"label":"Settings",
@@ -52,11 +52,12 @@
"label":"Rebuild",
"description":"rebuild"
}
- ]
+ ],
+ "order": 0
},
"users":{
- "label":"Users",
- "items":[
+ "label": "Users",
+ "itemList": [
{
"url":"#User",
"label":"Users",
@@ -82,11 +83,12 @@
"label": "Action History",
"description": "actionHistory"
}
- ]
+ ],
+ "order": 5
},
"customization":{
- "label":"Customization",
- "items":[
+ "label": "Customization",
+ "itemList": [
{
"url":"#Admin/layouts",
"label":"Layout Manager",
@@ -107,11 +109,12 @@
"label":"Extensions",
"description":"extensions"
}
- ]
+ ],
+ "order": 10
},
"email":{
- "label":"Email",
- "items":[
+ "label": "Email",
+ "itemList": [
{
"url":"#Admin/outboundEmails",
"label":"Outbound Emails",
@@ -142,11 +145,12 @@
"label":"Email Templates",
"description":"emailTemplates"
}
- ]
+ ],
+ "order": 15
},
"portal": {
- "label":"Portal",
- "items":[
+ "label": "Portal",
+ "itemList": [
{
"url":"#Portal",
"label":"Portals",
@@ -162,16 +166,18 @@
"label":"Portal Roles",
"description":"portalRoles"
}
- ]
+ ],
+ "order": 20
},
"data":{
- "label":"Data",
- "items":[
+ "label": "Data",
+ "itemList": [
{
"url":"#Import",
"label":"Import",
"description":"import"
}
- ]
+ ],
+ "order": 25
}
}
diff --git a/client/res/templates/admin/index.tpl b/client/res/templates/admin/index.tpl
index 390779cb2e..d4cb332d10 100644
--- a/client/res/templates/admin/index.tpl
+++ b/client/res/templates/admin/index.tpl
@@ -3,23 +3,26 @@
- {{#each links}}
-
{{translate label scope='Admin'}}
-
- {{/each}}
+
+ {{#each panelDataList}}
+
+
{{translate label scope='Admin'}}
+
+
+ {{/each}}
+
-
+
{{{notificationsPanel}}}
-
diff --git a/client/res/templates/admin/panels/notifications.tpl b/client/res/templates/admin/panels/notifications.tpl
index b7b537f22c..fd6113bd1c 100644
--- a/client/res/templates/admin/panels/notifications.tpl
+++ b/client/res/templates/admin/panels/notifications.tpl
@@ -2,7 +2,7 @@
-
+
{{#each notificationList}}
{{{message}}}
diff --git a/client/src/views/admin/index.js b/client/src/views/admin/index.js
index 87caebb7d7..35bed892fa 100644
--- a/client/src/views/admin/index.js
+++ b/client/src/views/admin/index.js
@@ -33,13 +33,28 @@ Espo.define('views/admin/index', 'view', function (Dep) {
data: function () {
return {
- links: this.links,
+ panelDataList: this.panelDataList,
iframeUrl: this.iframeUrl
};
},
setup: function () {
- this.links = this.getMetadata().get('app.adminPanel');
+ this.panelDataList = [];
+
+ var panels = this.getMetadata().get('app.adminPanel') || {};
+ for (var name in panels) {
+ var item = Espo.Utils.clone(panels[name]);
+ item.name = name;
+ item.itemList = item.itemList || item.items || [];
+ this.panelDataList.push(item);
+ }
+
+ this.panelDataList.sort(function (v1, v2) {
+ if (!('order' in v1) && ('order' in v2)) return true;
+ if (!('order' in v2)) return false;
+ return v1.order > v2.order;
+ }.bind(this));
+
this.iframeUrl = this.getConfig().get('adminPanelIframeUrl') || 'https://s.espocrm.com/';
if (!this.getConfig().get('adminNotificationsDisabled')) {
diff --git a/frontend/less/espo/custom.less b/frontend/less/espo/custom.less
index cec6e8f1f6..40db671e25 100644
--- a/frontend/less/espo/custom.less
+++ b/frontend/less/espo/custom.less
@@ -1432,12 +1432,32 @@ pre > code {
font-style: normal;
}
+.table-admin-panel tr > td:first-child {
+ width: 200px;
+}
+
+.admin-tables-container > div {
+ margin-bottom: 20px;
+ .table-admin-panel {
+ margin-bottom: 0;
+ }
+ > h4 {
+ margin-top: 0;
+ }
+}
+
@media screen and (min-width: @screen-sm-min) {
#global-search-panel {
margin-top: 5px;
}
}
+@media screen and (min-width: @screen-md-min) {
+ .admin-content .admin-right-column {
+ padding-top: 28px;
+ }
+}
+
@media screen and (max-width: @screen-sm-min) {
#notifications-panel {
position: fixed;