diff --git a/src/js/yunohost/controllers/apps.js b/src/js/yunohost/controllers/apps.js
index 10982dc7..1afd4678 100644
--- a/src/js/yunohost/controllers/apps.js
+++ b/src/js/yunohost/controllers/apps.js
@@ -199,96 +199,6 @@
});
});
- // List available apps lists
- app.get('#/apps/lists', function (c) {
- c.api('/appslists', function(data) {
- list = [];
- var has_community_list = false;
- $.each(data, function(listname, listinfo) {
- list.push({
- 'name': listname,
- 'url': listinfo['url'],
- 'lastUpdate': listinfo['lastUpdate']
- });
-
- // Check for community list
- if (listname == 'community' || listinfo['url'] == 'https://app.yunohost.org/community.json') {
- has_community_list = true;
- }
- });
-
- c.view('app/app_appslists_list', {
- appslists: list,
- has_community_list: has_community_list
- });
- }, 'GET');
- });
-
- // Add a new apps list
- app.post('#/apps/lists', function (c) {
- list = {
- 'name' : c.params['appslist_name'],
- 'url' : c.params['appslist_url']
- }
-
- c.api('/appslists', function(data) {
- store.clear('slide');
- c.redirect('#/apps/lists/' + list.name);
- }, 'PUT', list);
- });
-
- // Show appslist info and operations
- app.get('#/apps/lists/:appslist', function (c) {
- c.api('/appslists', function(data) {
- if (typeof data[c.params['appslist']] !== 'undefined') {
- list = {
- 'name' : c.params['appslist'],
- 'url': data[c.params['appslist']]['url'],
- 'lastUpdate': data[c.params['appslist']]['lastUpdate'],
- 'removable' : (c.params['appslist'] !== 'yunohost') ? true : false // Do not remove default apps list
- };
- c.view('app/app_appslists_info', {appslist: list});
- }
- else {
- c.flash('warning', y18n.t('appslists_unknown_list', [c.params['appslist']]));
- store.clear('slide');
- c.redirect('#/apps/lists');
- }
- }, 'GET');
- });
-
- // Refresh available apps list
- app.get('#/apps/lists/refresh', function (c) {
- c.api('/appslists', function(data) {
- // c.redirect(store.get('path'));
- c.redirect('#/apps/install');
- }, 'PUT');
- });
-
- // Refresh specific apps list
- app.get('#/apps/lists/:appslist/refresh', function (c) {
- c.api('/appslists', function(data) {
- c.redirect('#/apps/lists');
- }, 'PUT', {'name' : c.params['appslist']});
- });
-
- // Remove apps list
- app.get('#/apps/lists/:appslist/remove', function (c) {
- c.confirm(
- y18n.t('appslist'),
- y18n.t('appslists_confirm_remove', [c.params['app']]),
- function() {
- c.api('/appslists', function() {
- c.redirect('#/apps/lists');
- }, 'DELETE', {'name' : c.params['appslist']});
- },
- function() {
- store.clear('slide');
- c.redirect('#/apps/lists/'+ c.params['appslist']);
- }
- );
- });
-
// Get app information
app.get('#/apps/:app', function (c) {
c.api('/apps/'+c.params['app']+'?raw', function(data) { // http://api.yunohost.org/#!/app/app_info_get_9
diff --git a/src/js/yunohost/controllers/tools.js b/src/js/yunohost/controllers/tools.js
index 98aac838..7749a105 100644
--- a/src/js/yunohost/controllers/tools.js
+++ b/src/js/yunohost/controllers/tools.js
@@ -208,13 +208,6 @@
});
- // Packages version
- app.get('#/tools/versions', function (c) {
- c.api('/diagnosis', function(diagnosis) {
- c.view('tools/tools_versions', {'versions' : diagnosis.packages });
- });
- });
-
// Reboot or shutdown button
app.get('#/tools/reboot', function (c) {
c.view('tools/tools_reboot');
@@ -371,4 +364,86 @@
);
});
+ // List available apps lists
+ app.get('#/tools/appslists', function (c) {
+ c.api('/appslists', function(data) {
+ list = [];
+ $.each(data, function(listname, listinfo) {
+ list.push({
+ 'name': listname,
+ 'url': listinfo['url'],
+ 'lastUpdate': listinfo['lastUpdate']
+ });
+ });
+
+ c.view('tools/tools_appslists_list', {
+ appslists: list
+ });
+ }, 'GET');
+ });
+
+ // Add a new apps list
+ app.post('#/tools/appslists', function (c) {
+ list = {
+ 'name' : c.params['appslist_name'],
+ 'url' : c.params['appslist_url']
+ }
+
+ c.api('/appslists', function(data) {
+ store.clear('slide');
+ c.redirect('#/tools/appslists/' + list.name);
+ }, 'PUT', list);
+ });
+
+ // Show appslist info and operations
+ app.get('#/tools/appslists/:appslist', function (c) {
+ c.api('/appslists', function(data) {
+ if (typeof data[c.params['appslist']] !== 'undefined') {
+ list = {
+ 'name' : c.params['appslist'],
+ 'url': data[c.params['appslist']]['url'],
+ 'lastUpdate': data[c.params['appslist']]['lastUpdate'],
+ 'removable' : (c.params['appslist'] !== 'yunohost') ? true : false // Do not remove default apps list
+ };
+ c.view('tools/tools_appslists_info', {appslist: list});
+ }
+ else {
+ c.flash('warning', y18n.t('appslists_unknown_list', [c.params['appslist']]));
+ store.clear('slide');
+ c.redirect('#/tools/appslists');
+ }
+ }, 'GET');
+ });
+
+ // Refresh available apps list
+ app.get('#/tools/appslists/refresh', function (c) {
+ c.api('/appslists', function(data) {
+ // c.redirect(store.get('path'));
+ c.redirect('#/apps/install');
+ }, 'PUT');
+ });
+
+ // Refresh specific apps list
+ app.get('#/tools/appslists/:appslist/refresh', function (c) {
+ c.api('/appslists', function(data) {
+ c.redirect('#/tools/appslists');
+ }, 'PUT', {'name' : c.params['appslist']});
+ });
+
+ // Remove apps list
+ app.get('#/tools/appslists/:appslist/remove', function (c) {
+ c.confirm(
+ y18n.t('appslist'),
+ y18n.t('appslists_confirm_remove', [c.params['app']]),
+ function() {
+ c.api('/appslists', function() {
+ c.redirect('#/tools/appslists');
+ }, 'DELETE', {'name' : c.params['appslist']});
+ },
+ function() {
+ store.clear('slide');
+ c.redirect('#/tools/appslists/'+ c.params['appslist']);
+ }
+ );
+ });
})();
diff --git a/src/locales/en.json b/src/locales/en.json
index 4d5b08ec..314f9449 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -2,6 +2,7 @@
"action": "Action",
"active": "Active",
"add": "Add",
+ "advanced": "Advanced",
"remove": "Remove",
"administration_password": "Administration password",
"allowed_users": "Allowed users",
@@ -426,11 +427,7 @@
"appslists_info_remove_desc": "Applications from this list will not be available anymore.",
"appslists_last_update": "Last update",
"appslists_unknown_list": "Unknown apps list: %s",
- "appslists_community_list": "Community applications list",
"name": "Name",
- "install_community_appslists_info": "Community applications list allows you to install community maintained applications.
See the full list on yunohost.org/apps.",
- "install_community_appslists_warning": "Note that these applications packages are not official and not maintained by the YunoHost team.
Installing these applications is at your own risk and could break your system.",
- "install_custom_app_appslists_info": "Note that you can use alternative applications lists to install some other apps maintained by the YunoHost community.",
"purge_user_data_checkbox": "Purge %s's data? (This will remove the content of it's home and mail directories.)",
"purge_user_data_warning": "Purging user's data is not reversible. Be sure you know what you're doing!"
}
diff --git a/src/views/app/app_list_install.ms b/src/views/app/app_list_install.ms
index 52a11a5f..e0ce26b0 100644
--- a/src/views/app/app_list_install.ms
+++ b/src/views/app/app_list_install.ms
@@ -4,15 +4,6 @@
{{t 'install'}}
-
- {{t 'install_custom_app_appslists_info'}}
- -