mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Fix label
This commit is contained in:
parent
03190046fa
commit
257b2e7890
3 changed files with 9 additions and 6 deletions
|
@ -12,6 +12,11 @@
|
||||||
app.get('#/apps', function (c) {
|
app.get('#/apps', function (c) {
|
||||||
c.api('GET', '/apps?full', {}, function(data) {
|
c.api('GET', '/apps?full', {}, function(data) {
|
||||||
var apps = data['apps'];
|
var apps = data['apps'];
|
||||||
|
for (var a in apps)
|
||||||
|
{
|
||||||
|
var app = apps[a]
|
||||||
|
app['label'] = app['permissions'][app['id'] + ".main"]['label']
|
||||||
|
}
|
||||||
c.arraySortById(apps);
|
c.arraySortById(apps);
|
||||||
c.view('app/app_list', {apps: apps});
|
c.view('app/app_list', {apps: apps});
|
||||||
});
|
});
|
||||||
|
@ -262,10 +267,9 @@
|
||||||
// Get app information
|
// Get app information
|
||||||
app.get('#/apps/:app', function (c) {
|
app.get('#/apps/:app', function (c) {
|
||||||
c.api('GET', '/apps/'+c.params['app']+'?full', {}, function(data) {
|
c.api('GET', '/apps/'+c.params['app']+'?full', {}, function(data) {
|
||||||
c.api('GET', '/users/permissions', {}, function(data_permissions) {
|
data.label = data.permissions[c.params['app']+".main"]['label']
|
||||||
|
|
||||||
// Permissions
|
data.permissions = data.permissions[c.params['app']+".main"]["allowed"];
|
||||||
data.permissions = data_permissions.permissions[c.params['app']+".main"]["allowed"];
|
|
||||||
|
|
||||||
// Multilingual description
|
// Multilingual description
|
||||||
data.description = (typeof data.manifest.description[y18n.locale] !== 'undefined') ?
|
data.description = (typeof data.manifest.description[y18n.locale] !== 'undefined') ?
|
||||||
|
@ -304,7 +308,6 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<dt>{{t 'id'}}</dt>
|
<dt>{{t 'id'}}</dt>
|
||||||
<dd>{{settings.id}}</dd>
|
<dd>{{settings.id}}</dd>
|
||||||
<dt>{{t 'label'}}</dt>
|
<dt>{{t 'label'}}</dt>
|
||||||
<dd>{{settings.label}}</dd>
|
<dd>{{label}}</dd>
|
||||||
<dt>{{t 'description'}}</dt>
|
<dt>{{t 'description'}}</dt>
|
||||||
<dd>{{description}}</dd>
|
<dd>{{description}}</dd>
|
||||||
<dt>{{t 'version'}}</dt>
|
<dt>{{t 'version'}}</dt>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<a href="#/apps/{{id}}" class="list-group-item slide" title="{{t 'infos'}}">
|
<a href="#/apps/{{id}}" class="list-group-item slide" title="{{t 'infos'}}">
|
||||||
<span class="fa-chevron-right pull-right"></span>
|
<span class="fa-chevron-right pull-right"></span>
|
||||||
<h2 class="list-group-item-heading">
|
<h2 class="list-group-item-heading">
|
||||||
{{settings.label}} <small>{{name}}</small>
|
{{label}} <small>{{name}}</small>
|
||||||
</h2>
|
</h2>
|
||||||
<p class="list-group-item-text">{{description}}</p>
|
<p class="list-group-item-text">{{description}}</p>
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Add table
Reference in a new issue