mirror of
https://github.com/espocrm/espocrm.git
synced 2026-03-03 02:17:01 +00:00
navbar url open in new tab parameter
This commit is contained in:
@@ -242,7 +242,8 @@
|
||||
"aclScope": "ACL Scope",
|
||||
"onlyAdmin": "Only for Admin",
|
||||
"notStorable": "Not Storable",
|
||||
"itemsEditable": "Items Editable"
|
||||
"itemsEditable": "Items Editable",
|
||||
"openInNewTab": "Open in new tab"
|
||||
},
|
||||
"strings" : {
|
||||
"rebuildRequired": "Rebuild is required"
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
{{#if link}}href="{{link}}"{{else}}role="button"{{/if}}
|
||||
class="{{aClassName}}"
|
||||
{{#if color}}style="border-color: {{color}}"{{/if}}
|
||||
{{#if openInNewTab}} target="_blank" {{/if}}
|
||||
{{#if isGroup}}
|
||||
id="nav-tab-group-{{name}}"
|
||||
data-toggle="dropdown"
|
||||
@@ -69,6 +70,7 @@
|
||||
id="nav-tab-group-{{name}}"
|
||||
data-toggle="dropdown"
|
||||
{{/if}}
|
||||
{{#if openInNewTab}} target="_blank" {{/if}}
|
||||
>
|
||||
<span class="short-label"{{#if color}} style="color: {{color}}"{{/if}}>
|
||||
{{#if iconClass}}
|
||||
@@ -116,6 +118,7 @@
|
||||
id="nav-tab-group-{{name}}"
|
||||
data-toggle="dropdown"
|
||||
{{/if}}
|
||||
{{#if openInNewTab}} target="_blank" {{/if}}
|
||||
>
|
||||
<span class="short-label"{{#if color}} style="color: {{color}}"{{/if}}>
|
||||
{{#if iconClass}}
|
||||
@@ -155,6 +158,7 @@
|
||||
id="nav-tab-group-{{name}}"
|
||||
data-toggle="dropdown"
|
||||
{{/if}}
|
||||
{{#if openInNewTab}} target="_blank" {{/if}}
|
||||
>
|
||||
<span class="short-label"{{#if color}} style="color: {{color}}"{{/if}}>
|
||||
{{#if iconClass}}
|
||||
|
||||
@@ -94,7 +94,10 @@ class SettingsEditTabUrlModalView extends Modal {
|
||||
name: 'onlyAdmin',
|
||||
labelText: this.translate('onlyAdmin', 'fields', 'Admin'),
|
||||
},
|
||||
false
|
||||
{
|
||||
name: 'openInNewTab',
|
||||
labelText: this.translate('openInNewTab', 'fields', 'Admin'),
|
||||
},
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -130,6 +133,9 @@ class SettingsEditTabUrlModalView extends Modal {
|
||||
onlyAdmin: {
|
||||
type: 'bool',
|
||||
},
|
||||
openInNewTab: {
|
||||
type: 'bool',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -1260,7 +1260,8 @@ class NavbarSiteView extends View {
|
||||
* label: string,
|
||||
* isGroup: boolean,
|
||||
* aClassName: string,
|
||||
* iconClass: null
|
||||
* iconClass: null,
|
||||
* openInNewTab: boolean,
|
||||
* }}
|
||||
*/
|
||||
prepareTabItemDefs(params, tab, i, vars) {
|
||||
@@ -1273,6 +1274,7 @@ class NavbarSiteView extends View {
|
||||
let isUrl = false;
|
||||
let name = tab;
|
||||
let aClassName = 'nav-link';
|
||||
let openInNewTab = false;
|
||||
|
||||
const label = this.tabsHelper.getTranslatedTabLabel(tab);
|
||||
|
||||
@@ -1290,6 +1292,7 @@ class NavbarSiteView extends View {
|
||||
link = tab.url || '#';
|
||||
color = tab.color;
|
||||
iconClass = tab.iconClass;
|
||||
openInNewTab = tab.openInNewTab ?? false;
|
||||
|
||||
this.urlList.push({name: name, url: link});
|
||||
} else if (this.tabsHelper.isTabGroup(tab)) {
|
||||
@@ -1336,6 +1339,7 @@ class NavbarSiteView extends View {
|
||||
aClassName: aClassName,
|
||||
isGroup: isGroup,
|
||||
isDivider: isDivider,
|
||||
openInNewTab,
|
||||
};
|
||||
|
||||
if (isGroup) {
|
||||
|
||||
Reference in New Issue
Block a user