mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
show app-icon and translated name for /(apps|templates)/$app
This commit is contained in:
parent
a6dfa98280
commit
946b0a5e43
@ -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(<number><unknown>pathName))
|
||||
if(!isNaN(<number><unknown>pathName) && pathParts[1] !== "templates")
|
||||
{
|
||||
pathName = html`${until(this.egw().link_title(pathParts[2], pathParts[3], true) || pathName, pathName)}`
|
||||
}
|
||||
|
@ -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"))
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user