diff --git a/application/Espo/Resources/layouts/Role/detail.json b/application/Espo/Resources/layouts/Role/detail.json
index 460e0b0896..6080bb67cb 100644
--- a/application/Espo/Resources/layouts/Role/detail.json
+++ b/application/Espo/Resources/layouts/Role/detail.json
@@ -3,13 +3,11 @@
"rows": [
[
{"name": "name"},
- {"name": "exportPermission"}
- ],
- [
- {"name": "assignmentPermission"},
+ {"name": "exportPermission"},
{"name": "userPermission"}
],
[
+ {"name": "assignmentPermission"},
{"name": "portalPermission"},
{"name": "groupEmailAccountPermission"}
]
diff --git a/client/res/layout-types/record.tpl b/client/res/layout-types/record.tpl
index e3311977d9..a5fef71fe7 100644
--- a/client/res/layout-types/record.tpl
+++ b/client/res/layout-types/record.tpl
@@ -19,8 +19,55 @@
<% _.each(panel.rows, function (row, rowNumber) { %>
<% _.each(row, function (cell, cellNumber) { %>
+
+ <%
+ var spanClassBase;
+ if (columnCount === 1) {
+ spanClassBase = 'col-sm-12';
+ } else if (columnCount === 2) {
+ spanClassBase = 'col-sm-6';
+ } else if (columnCount === 3) {
+ spanClassBase = 'col-sm-4';
+ } else if (columnCount === 4) {
+ spanClassBase = 'col-md-3 col-sm-6';
+ } else {
+ spanClass = 'col-sm-12';
+ }
+ %>
<% if (cell != false) { %>
-
<% } else { %>
-
+
<% } %>
<% }); %>
diff --git a/client/src/views/record/detail.js b/client/src/views/record/detail.js
index 7444e2ea7b..98116e5c0e 100644
--- a/client/src/views/record/detail.js
+++ b/client/src/views/record/detail.js
@@ -1106,6 +1106,9 @@ Espo.define('views/record/detail', ['views/record/base', 'view-record-helper'],
if ('noLabel' in cellDefs) {
cell.noLabel = cellDefs.noLabel;
}
+ if ('span' in cellDefs) {
+ cell.span = cellDefs.span;
+ }
row.push(cell);
}
@@ -1123,9 +1126,11 @@ Espo.define('views/record/detail', ['views/record/base', 'view-record-helper'],
return;
}
+ var gridLayoutType = this.gridLayoutType || 'record';
+
if (this.detailLayout) {
this.gridLayout = {
- type: 'record',
+ type: gridLayoutType,
layout: this.convertDetailLayout(this.detailLayout)
};
callback(this.gridLayout);
@@ -1134,7 +1139,7 @@ Espo.define('views/record/detail', ['views/record/base', 'view-record-helper'],
this._helper.layoutManager.get(this.model.name, this.layoutName, function (simpleLayout) {
this.gridLayout = {
- type: 'record',
+ type: gridLayoutType,
layout: this.convertDetailLayout(simpleLayout)
};
callback(this.gridLayout);
diff --git a/client/src/views/role/record/detail.js b/client/src/views/role/record/detail.js
index 70f558f195..340cc69f16 100644
--- a/client/src/views/role/record/detail.js
+++ b/client/src/views/role/record/detail.js
@@ -38,6 +38,8 @@ Espo.define('views/role/record/detail', 'views/record/detail', function (Dep) {
editModeDisabled: true,
+ columnCount: 3,
+
setup: function () {
Dep.prototype.setup.call(this);
this.createView('extra', this.tableView, {
diff --git a/client/src/views/role/record/edit.js b/client/src/views/role/record/edit.js
index 73d99e42b3..a0d1c2a808 100644
--- a/client/src/views/role/record/edit.js
+++ b/client/src/views/role/record/edit.js
@@ -36,6 +36,8 @@ Espo.define('views/role/record/edit', 'views/record/edit', function (Dep) {
isWide: true,
+ columnCount: 3,
+
events: _.extend({
}, Dep.prototype.events),