Skip to content

EspoCRM – Open Source CRM Application

currency settings button

Yuriie3c576b38fce
diff --git a/application/Espo/Resources/metadata/clientDefs/CurrencyRecord.json b/application/Espo/Resources/metadata/clientDefs/CurrencyRecord.json
index 88594ae0bd..af64c09a82 100644
--- a/application/Espo/Resources/metadata/clientDefs/CurrencyRecord.json
+++ b/application/Espo/Resources/metadata/clientDefs/CurrencyRecord.json
@@ -10,6 +10,9 @@
"filterList": [
"active"
],
+ "views": {
+ "list": "views/currency-record/list"
+ },
"viewSetupHandlers": {
"record/detail": [
"handlers/currency-record/record-detail"
@@ -24,5 +27,18 @@
"view": "views/currency-record/record/panels/rates",
"unlinkDisabled": true
}
+ },
+ "menu": {
+ "list": {
+ "buttons": [
+ {
+ "name": "settings",
+ "labelTranslation": "Global.scopeNames.Settings",
+ "link": "#Admin/currency",
+ "handler": "handlers/currency-record/menu-action-settings",
+ "checkVisibilityFunction": "isVisible"
+ }
+ ]
+ }
}
}
diff --git a/client/src/handlers/currency-record/menu-action-settings.js b/client/src/handlers/currency-record/menu-action-settings.js
new file mode 100644
index 0000000000..6f05c97af6
--- /dev/null
+++ b/client/src/handlers/currency-record/menu-action-settings.js
@@ -0,0 +1,41 @@
+/************************************************************************
+ * 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 ActionHandler from 'action-handler';
+
+export default class CurrencyRecordMenuActionSettingsHandler extends ActionHandler {
+
+
+ // noinspection JSUnusedGlobalSymbols
+ isVisible() {
+ /** @type {Record} */
+ const params = this.view.options?.params ?? {};
+
+ return params.fromSettings ?? false;
+ }
+}
diff --git a/client/src/views/admin/currency.js b/client/src/views/admin/currency.js
index 42aa8a595d..f1947a0fb3 100644
--- a/client/src/views/admin/currency.js
+++ b/client/src/views/admin/currency.js
@@ -59,7 +59,7 @@ export default class extends SettingsEditRecordView {
view.addMenuItem('buttons', {
name: 'currencyRecords',
- link: '#CurrencyRecord',
+ link: '#CurrencyRecord/list/fromSettings=true',
labelTranslation: 'Settings.labels.Currency Rates',
iconClass: 'fas fa-euro-sign',
});
diff --git a/client/src/views/currency-record/list.js b/client/src/views/currency-record/list.js
new file mode 100644
index 0000000000..4be3539219
--- /dev/null
+++ b/client/src/views/currency-record/list.js
@@ -0,0 +1,34 @@
+/************************************************************************
+ * 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 ListView from 'views/list';
+
+export default class extends ListView {
+
+ keepCurrentRootUrl = true
+}