diff --git a/api/js/etemplate/Et2Vfs/Et2VfsPath.ts b/api/js/etemplate/Et2Vfs/Et2VfsPath.ts index 8365d51107..8c2db958ca 100644 --- a/api/js/etemplate/Et2Vfs/Et2VfsPath.ts +++ b/api/js/etemplate/Et2Vfs/Et2VfsPath.ts @@ -262,7 +262,7 @@ export class Et2VfsPath extends Et2InputWidget(LitElement) protected _getIcon(pathParts) { let image = this.egw().image("navbar", "filemanager"); - if(pathParts.length > 2 && pathParts[1] == "apps") + if(pathParts.length > 2 && (pathParts[1] == "apps" || pathParts[1] == "templates")) { const app = this.egw().app(pathParts[2], 'name') || this.egw().appByTitle(pathParts[2], 'name'); if (app && !(image = this.egw().image('navbar', app))) @@ -277,18 +277,18 @@ export class Et2VfsPath extends Et2InputWidget(LitElement) protected pathPartTemplate(pathParts, path, index) { let pathName : string | TemplateResult<1> = path.trim(); - if(pathParts.length > 1 && pathParts[1] == "apps") + if(pathParts.length > 1 && (pathParts[1] == "apps" || pathParts[1] == "templates")) { switch(index) { case 1: - pathName = this.egw().lang("applications"); + pathName = this.egw().lang(pathParts[1] == "apps" ? "Applications" : "Templates"); break; case 2: pathName = this.egw().lang(pathName); break; case 3: - if(!isNaN(pathName)) + if(!isNaN(pathName) && pathParts[1] !== "templates") { pathName = html`${until(this.egw().link_title(pathParts[2], pathParts[3], true) || pathName, pathName)}` } diff --git a/api/js/etemplate/et2_widget_vfs.ts b/api/js/etemplate/et2_widget_vfs.ts index b04af021ee..f344ebe878 100644 --- a/api/js/etemplate/et2_widget_vfs.ts +++ b/api/js/etemplate/et2_widget_vfs.ts @@ -151,6 +151,10 @@ export class et2_vfs extends et2_valueWidget implements et2_IDetachedDOM break; } } + else if (sub_path === '/templates' && path_parts.length === 1) + { + text = this.egw().lang(path_parts[0]); + } let self = this; var data = {path: path, type: i < path_parts.length-1 ? et2_vfs.DIR_MIME_TYPE : _value.mime }; var node = jQuery(document.createElement("li")) diff --git a/api/js/jsapi/egw_images.js b/api/js/jsapi/egw_images.js index 97b4504229..836d8a2e12 100644 --- a/api/js/jsapi/egw_images.js +++ b/api/js/jsapi/egw_images.js @@ -162,6 +162,15 @@ egw.extend('images', egw.MODULE_GLOBAL, function() if (!_mime) _mime = 'unknown'; if (_mime == 'httpd/unix-directory') _mime = 'directory'; + if (typeof _path == 'string' && _mime === 'directory') + { + const path_parts = _path.split('/'); + if (path_parts.length === 3 && (path_parts[1] === 'apps' || path_parts[1] === 'templates')) + { + _mime = 'egw/'+path_parts[2]; + } + } + var type = _mime.toLowerCase().split('/'); var image = type[0] == 'egw' ? this.image('navbar',type[1]) : undefined; diff --git a/api/lang/egw_de.lang b/api/lang/egw_de.lang index 56d0acbb62..b0300d7444 100644 --- a/api/lang/egw_de.lang +++ b/api/lang/egw_de.lang @@ -1378,6 +1378,7 @@ tanzania, united republic of common de TANZANIA, VEREINIGTE REPUBLIK template common de Template template deleted common de Template gelöscht. template saved common de Template gespeichert. +templates common de Vorlagen text common de Textfeld text color: common de Textfarbe: textarea common de Mehrzeiliges Textfeld diff --git a/api/lang/egw_en.lang b/api/lang/egw_en.lang index 20d2d6774d..bec5b0b1b5 100644 --- a/api/lang/egw_en.lang +++ b/api/lang/egw_en.lang @@ -1378,6 +1378,7 @@ tanzania, united republic of common en TANZANIA, UNITED REPUBLIC OF template common en Template template deleted common en Template deleted. template saved common en Template saved. +templates common en Templates text common en Text text color: common en Text colour: textarea common en Text area