EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
Last viewed style impr
Yuriif34fcc266d74
diff --git a/application/Espo/Resources/layouts/ActionHistoryRecord/listForLastViewed.json b/application/Espo/Resources/layouts/ActionHistoryRecord/listForLastViewed.jsonindex bbfe1200b6..02ab0c16e0 100644--- a/application/Espo/Resources/layouts/ActionHistoryRecord/listForLastViewed.json+++ b/application/Espo/Resources/layouts/ActionHistoryRecord/listForLastViewed.json@@ -1,5 +1,19 @@[- {"name":"targetType", "notSortable": true, "width": 22},- {"name":"target", "notSortable": true},- {"name":"createdAt", "notSortable": true, "width": 20, "align": "right", "view": "views/fields/datetime-short"}-]\ No newline at end of file+ {+ "name": "targetType",+ "notSortable": true,+ "width": 22,+ "view": "views/last-viewed/fields/target-type"+ },+ {+ "name": "target",+ "notSortable": true+ },+ {+ "name":"createdAt",+ "notSortable": true,+ "width": 20,+ "align": "right",+ "view": "views/last-viewed/fields/created-at"+ }+]diff --git a/client/src/views/action-history-record/fields/target-type.js b/client/src/views/action-history-record/fields/target-type.jsindex f4ec282d64..0003c32769 100644--- a/client/src/views/action-history-record/fields/target-type.js+++ b/client/src/views/action-history-record/fields/target-type.js@@ -36,4 +36,3 @@ export default class extends EnumFieldView {this.params.options = this.getMetadata().getScopeEntityList();}}-diff --git a/client/src/views/last-viewed/fields/created-at.ts b/client/src/views/last-viewed/fields/created-at.tsnew file mode 100644index 0000000000..c80193fc79--- /dev/null+++ b/client/src/views/last-viewed/fields/created-at.ts@@ -0,0 +1,47 @@+/************************************************************************+ * This file is part of EspoCRM.+ *+ * EspoCRM – Open Source CRM application.+ * Copyright (C) 2014-2026 EspoCRM, Inc.+ * Website: https://www.espocrm.com+ *+ * This program is free software: you can redistribute it and/or modify+ * it under the terms of the GNU Affero General Public License as published by+ * the Free Software Foundation, either version 3 of the License, or+ * (at your option) any later version.+ *+ * This program is distributed in the hope that it will be useful,+ * but WITHOUT ANY WARRANTY; without even the implied warranty of+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ * GNU Affero General Public License for more details.+ *+ * You should have received a copy of the GNU Affero General Public License+ * along with this program. If not, see <https://www.gnu.org/licenses/>.+ *+ * The interactive user interfaces in modified source and object code versions+ * of this program must display Appropriate Legal Notices, as required under+ * Section 5 of the GNU Affero General Public License version 3.+ *+ * In accordance with Section 7(b) of the GNU Affero General Public License version 3,+ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word.+ ************************************************************************/++import DatetimeShortFieldView from 'views/fields/datetime-short';++export default class LastViewedCreatedAtFieldView extends DatetimeShortFieldView {++ data(): Record<string, any> {+ return {+ ...super.data(),+ style: 'soft',+ };+ }++ protected afterRender() {+ super.afterRender();++ if (this.isListMode()) {+ this.element.querySelector(':scope > span')?.classList.add('small');+ }+ }+}diff --git a/client/src/views/last-viewed/fields/target-type.ts b/client/src/views/last-viewed/fields/target-type.tsnew file mode 100644index 0000000000..a7a47d654a--- /dev/null+++ b/client/src/views/last-viewed/fields/target-type.ts@@ -0,0 +1,45 @@+/************************************************************************+ * This file is part of EspoCRM.+ *+ * EspoCRM – Open Source CRM application.+ * Copyright (C) 2014-2026 EspoCRM, Inc.+ * Website: https://www.espocrm.com+ *+ * This program is free software: you can redistribute it and/or modify+ * it under the terms of the GNU Affero General Public License as published by+ * the Free Software Foundation, either version 3 of the License, or+ * (at your option) any later version.+ *+ * This program is distributed in the hope that it will be useful,+ * but WITHOUT ANY WARRANTY; without even the implied warranty of+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ * GNU Affero General Public License for more details.+ *+ * You should have received a copy of the GNU Affero General Public License+ * along with this program. If not, see <https://www.gnu.org/licenses/>.+ *+ * The interactive user interfaces in modified source and object code versions+ * of this program must display Appropriate Legal Notices, as required under+ * Section 5 of the GNU Affero General Public License version 3.+ *+ * In accordance with Section 7(b) of the GNU Affero General Public License version 3,+ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word.+ ************************************************************************/++import BaseFieldView from 'views/fields/base';++export default class LastViewedTargetTypeFieldView extends BaseFieldView {++ // language=Handlebars+ templateContent = `+ <span class="text-soft small">{{value}}</span>+ `++ protected data(): Record<string, any> {+ const value = this.model.attributes[this.name];++ return {+ value: this.translate(value, 'scopeNames'),+ };+ }+}diff --git a/frontend/less/espo/variables.less b/frontend/less/espo/variables.lessindex 737e23d41a..1530c16114 100644--- a/frontend/less/espo/variables.less+++ b/frontend/less/espo/variables.less@@ -169,7 +169,7 @@@list-table-sm-screen-min-width: var(--500px);@navbar-panel-body-max-height: var(--600px);@notifications-panel-width: ~"min(var(--640px), 80vw)";-@global-search-panel-width: ~"min(var(--600px), 80vw)";+@global-search-panel-width: ~"min(var(--640px), 80vw)";@popover-bg: var(--popover-bg);@popover-title-bg: var(--white-color);