mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[fix] Only display apps with backup script on backup creation page. #227
This commit is contained in:
parent
a53a772ac2
commit
b3c63c93b6
2 changed files with 3 additions and 10 deletions
|
@ -52,14 +52,8 @@
|
||||||
c.api('/hooks/backup', function(hooks) {
|
c.api('/hooks/backup', function(hooks) {
|
||||||
data['hooks']=c.groupHooks(hooks['hooks']);
|
data['hooks']=c.groupHooks(hooks['hooks']);
|
||||||
data['apps']={};
|
data['apps']={};
|
||||||
c.api('/apps?raw', function(apps) { // http://api.yunohost.org/#!/app/app_list_get_8
|
c.api('/apps?with_backup', function(apps_list) {
|
||||||
$.each(apps, function(app_id, app) {
|
data['apps'] = apps_list.apps;
|
||||||
if (app['installed'])
|
|
||||||
data['apps'][app_id]={
|
|
||||||
id: app_id,
|
|
||||||
name: app['manifest']['name']
|
|
||||||
};
|
|
||||||
});
|
|
||||||
c.view('backup/backup_create', data);
|
c.view('backup/backup_create', data);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -33,8 +33,7 @@
|
||||||
<div class="list-group-item">
|
<div class="list-group-item">
|
||||||
<input type="checkbox" id="{{id}}" name="apps" value="{{id}}" checked class="nice-checkbox">
|
<input type="checkbox" id="{{id}}" name="apps" value="{{id}}" checked class="nice-checkbox">
|
||||||
<label for="{{id}}" class="pull-right"><span class="sr-only">{{t 'check'}}</span></label>
|
<label for="{{id}}" class="pull-right"><span class="sr-only">{{t 'check'}}</span></label>
|
||||||
<h2 class="list-group-item-heading">{{name}} <small>{{id}}</small></h2>
|
<h2 class="list-group-item-heading">{{label}} <small>{{id}}</small></h2>
|
||||||
<p class="list-group-item-text">{{description}}</p>
|
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue