From b26bcf2978bf5f96d96ff04614d688323c6f6a50 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 30 Oct 2020 10:32:18 +0100 Subject: [PATCH] Show organisation name on CRM view if exists --- addressbook/js/app.js | 3 ++- addressbook/js/app.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/addressbook/js/app.js b/addressbook/js/app.js index 1d193399ce..15824cda63 100644 --- a/addressbook/js/app.js +++ b/addressbook/js/app.js @@ -206,7 +206,8 @@ var AddressbookApp = /** @class */ (function (_super) { extras.crm_list = _action.id.replace('view-', ''); } this.egw.openTab(id, 'addressbook', 'view', extras, { - displayName: data.n_fn + " (" + egw.lang(extras.crm_list) + ")", + displayName: (_action.id.match(/\-organisation/) && data.org_name != "") ? data.org_name + : data.data.n_fn + " (" + egw.lang(extras.crm_list) + ")", icon: data.photo, refreshCallback: this.view_refresh, id: id + '-' + extras.crm_list, diff --git a/addressbook/js/app.ts b/addressbook/js/app.ts index 18db4b1d86..c48fa0e7f9 100644 --- a/addressbook/js/app.ts +++ b/addressbook/js/app.ts @@ -229,7 +229,8 @@ class AddressbookApp extends EgwApp } this.egw.openTab(id, 'addressbook', 'view', extras, { - displayName: data.n_fn+" ("+egw.lang(extras.crm_list)+")", + displayName: (_action.id.match(/\-organisation/) && data.org_name != "") ? data.org_name + : data.data.n_fn+" ("+egw.lang(extras.crm_list)+")", icon: data.photo, refreshCallback: this.view_refresh, id: id+'-'+extras.crm_list,