Skip to content

EspoCRM – Open Source CRM Application

Panel icons

Yuriid40186102137
diff --git a/client/modules/crm/src/views/record/panels/activities.js b/client/modules/crm/src/views/record/panels/activities.js
index 5c2033f72f..9a8ae83a20 100644
--- a/client/modules/crm/src/views/record/panels/activities.js
+++ b/client/modules/crm/src/views/record/panels/activities.js
@@ -49,6 +49,7 @@ class ActivitiesPanelView extends RelationshipPanelView {
label: 'Compose Email',
acl: 'create',
aclScope: 'Email',
+ iconClass: 'far fa-envelope',
},
]
@@ -231,6 +232,7 @@ class ActivitiesPanelView extends RelationshipPanelView {
data: {},
acl: 'create',
aclScope: scope,
+ iconClass: 'fas fa-plus',
};
const link = this.getMetadata().get(['clientDefs', scope, 'activityDefs', 'link']);
@@ -309,6 +311,7 @@ class ActivitiesPanelView extends RelationshipPanelView {
},
acl: 'read',
aclScope: scope,
+ iconClass: 'fas fa-align-justify',
};
this.actionList.push(o);
diff --git a/client/modules/crm/src/views/record/panels/history.js b/client/modules/crm/src/views/record/panels/history.js
index 2b2b9e5c59..7a72cc610a 100644
--- a/client/modules/crm/src/views/record/panels/history.js
+++ b/client/modules/crm/src/views/record/panels/history.js
@@ -78,6 +78,7 @@ class HistoryPanelView extends ActivitiesPanelView {
label: 'Archive Email',
acl: 'create',
aclScope: 'Email',
+ iconClass: 'far fa-envelope',
});
}
diff --git a/client/modules/crm/src/views/record/panels/tasks.js b/client/modules/crm/src/views/record/panels/tasks.js
index 29720edd7e..c7dbc7496a 100644
--- a/client/modules/crm/src/views/record/panels/tasks.js
+++ b/client/modules/crm/src/views/record/panels/tasks.js
@@ -53,7 +53,8 @@ export default class TasksRelationshipPanelView extends RelationshipPanelView {
actionList = [
{
label: 'View List',
- action: 'viewRelatedList'
+ action: 'viewRelatedList',
+ iconClass: 'fas fa-align-justify',
}
]
diff --git a/client/res/templates/record/panel-actions.tpl b/client/res/templates/record/panel-actions.tpl
index 55db8c933c..3856279384 100644
--- a/client/res/templates/record/panel-actions.tpl
+++ b/client/res/templates/record/panel-actions.tpl
@@ -31,6 +31,7 @@
data=data
link=link
className='panel-action'
+ iconClass=iconClass
}}
{{else}}
{{#unless @first}}
diff --git a/client/src/view-helper.js b/client/src/view-helper.js
index 0eb45c851c..4fdc923034 100644
--- a/client/src/view-helper.js
+++ b/client/src/view-helper.js
@@ -463,12 +463,21 @@ class ViewHelper {
}
if (iconHtml) {
- html = iconHtml + ' ' + html;
- }
- else if (iconClass) {
- const iconHtml = $('<span>').addClass(iconClass).get(0).outerHTML;
-
- html = iconHtml + ' ' + html;
+ html = iconHtml + '' + html;
+ } else if (iconClass) {
+ const iconHtml = $('<span>')
+ .addClass(iconClass)
+ .addClass('item-icon')
+ .get(0)
+ .outerHTML;
+
+ html = '<span class="item-text">' + html + '</span>';
+
+ html = iconHtml + html;
+ } else {
+ if (!options.hash.html) {
+ html = '<span class="item-text">' + html + '</span>';
+ }
}
const $li = $('<li>')
diff --git a/client/src/views/record/panels-container.js b/client/src/views/record/panels-container.js
index d2e8052b61..0a3f085083 100644
--- a/client/src/views/record/panels-container.js
+++ b/client/src/views/record/panels-container.js
@@ -94,6 +94,7 @@ class PanelsContainerRecordView extends View {
* @property {string} [label] A label. Translatable.
* @property {string} [html] A HTML.
* @property {string} [text] A text.
+ * @property {string} [iconClass] An icon class. As of v10.0.
* @property {Object.<string, (string|number|boolean)>} [data] Data attributes.
* @property {string} [handler] A handler.
* @property {string} [actionFunction] An action function.
diff --git a/client/src/views/record/panels/relationship.js b/client/src/views/record/panels/relationship.js
index 481e53c7ee..3464798ca6 100644
--- a/client/src/views/record/panels/relationship.js
+++ b/client/src/views/record/panels/relationship.js
@@ -264,6 +264,7 @@ class RelationshipPanelView extends BottomPanelView {
action: this.defs.selectAction || 'selectRelated',
data: data,
acl: this.defs.selectRequiredAccess || 'edit',
+ iconClass: 'fas fa-angle-up',
});
}
@@ -271,6 +272,7 @@ class RelationshipPanelView extends BottomPanelView {
this.actionList.unshift({
label: 'View List',
action: this.defs.viewAction || 'viewRelatedList',
+ iconClass: 'fas fa-align-justify',
});
}
@@ -534,7 +536,7 @@ class RelationshipPanelView extends BottomPanelView {
.addClass(!selected ? 'hidden' : '')
)
.append(
- $('<div>').text(label)
+ $('<div class="item-text">').text(label)
);
this.actionList.push({
diff --git a/client/src/views/stream/panel.js b/client/src/views/stream/panel.js
index 5dde1c8947..84bafb160c 100644
--- a/client/src/views/stream/panel.js
+++ b/client/src/views/stream/panel.js
@@ -816,7 +816,7 @@ class PanelStreamView extends RelationshipPanelView {
$('<span>')
.addClass('check-icon fas fa-check pull-right')
.addClass(!selected ? ' hidden' : ''),
- $('<div>')
+ $('<div class="item-text">')
.text(this.translate(item, 'filters', 'Note')),
)
.get(0).innerHTML,