mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[enh] Adapt to brand new moulinette.
This commit is contained in:
parent
fb057eadfb
commit
ccaf9199fb
10 changed files with 169 additions and 130 deletions
219
js/app.js
219
js/app.js
|
@ -94,8 +94,8 @@ app = Sammy('#main', function (sam) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var args = data;
|
var args = data;
|
||||||
auth = "Basic "+ btoa(store.get('user') +':'+ atob(store.get('password')));
|
// auth = "Basic "+ btoa('admin' +':'+ atob('yolo'));
|
||||||
if (uri == '/postinstall') {
|
if (uri === '/postinstall') {
|
||||||
var installing = false;
|
var installing = false;
|
||||||
|
|
||||||
setInterval(function () {
|
setInterval(function () {
|
||||||
|
@ -123,12 +123,44 @@ app = Sammy('#main', function (sam) {
|
||||||
data: data,
|
data: data,
|
||||||
traditional: true,
|
traditional: true,
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
beforeSend: function(req) {
|
// beforeSend: function(req) {
|
||||||
req.setRequestHeader('Authorization', auth);
|
// req.setRequestHeader('Authorization', auth);
|
||||||
}
|
// }
|
||||||
})
|
})
|
||||||
.success(function(data) {
|
/*
|
||||||
data = typeof data !== 'undefined' ? data : {};
|
.always(function(data) {
|
||||||
|
if (data.status !== 'undefined' && uri === '/login') {
|
||||||
|
if (data.status === 401) {
|
||||||
|
$('#popup').modal('hide');
|
||||||
|
c.flash('fail', y18n.t('wrong_password'));
|
||||||
|
}
|
||||||
|
// 200 & empty response TODO: better comment
|
||||||
|
// /login
|
||||||
|
else if (data.status === 200) {
|
||||||
|
// data = typeof data !== 'undefined' ? data : {};
|
||||||
|
if (typeof data.win !== 'undefined') {
|
||||||
|
$.each(data.win, function(k, v) {
|
||||||
|
c.flash('success', v);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
callback(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
loaded = true;
|
||||||
|
$('div.loader').remove();
|
||||||
|
|
||||||
|
})
|
||||||
|
*/
|
||||||
|
.always(function(xhr, ts, error) {
|
||||||
|
// console.log("always");
|
||||||
|
// console.log(xhr);
|
||||||
|
// console.log(ts);
|
||||||
|
// console.log(error);
|
||||||
|
})
|
||||||
|
.done(function(data) {
|
||||||
|
// console.log('success');console.log(data);
|
||||||
|
// data = typeof data !== 'undefined' ? data : {};
|
||||||
|
data = data || {};
|
||||||
if (typeof data.win !== 'undefined') {
|
if (typeof data.win !== 'undefined') {
|
||||||
$.each(data.win, function(k, v) {
|
$.each(data.win, function(k, v) {
|
||||||
c.flash('success', v);
|
c.flash('success', v);
|
||||||
|
@ -137,9 +169,13 @@ app = Sammy('#main', function (sam) {
|
||||||
callback(data);
|
callback(data);
|
||||||
})
|
})
|
||||||
.fail(function(xhr) {
|
.fail(function(xhr) {
|
||||||
|
// console.log('fail');console.log(xhr);
|
||||||
if (xhr.status == 401) {
|
if (xhr.status == 401) {
|
||||||
$('#popup').modal('hide');
|
$('#popup').modal('hide');
|
||||||
c.flash('fail', y18n.t('wrong_password'));
|
if (uri !== '/login') {
|
||||||
|
c.flash('fail', y18n.t('unauthorized'));
|
||||||
|
c.redirect('#/login');
|
||||||
|
}
|
||||||
} else if (typeof xhr.responseJSON !== 'undefined') {
|
} else if (typeof xhr.responseJSON !== 'undefined') {
|
||||||
$('#popup').modal('hide');
|
$('#popup').modal('hide');
|
||||||
c.flash('fail', xhr.responseJSON.error);
|
c.flash('fail', xhr.responseJSON.error);
|
||||||
|
@ -170,10 +206,6 @@ app = Sammy('#main', function (sam) {
|
||||||
}
|
}
|
||||||
store.clear('slide');
|
store.clear('slide');
|
||||||
c.redirect(store.get('path-1'));
|
c.redirect(store.get('path-1'));
|
||||||
})
|
|
||||||
.done(function(data) {
|
|
||||||
loaded = true;
|
|
||||||
$('div.loader').remove();
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -239,14 +271,14 @@ app = Sammy('#main', function (sam) {
|
||||||
// Preload domains list.
|
// Preload domains list.
|
||||||
req.params.domains = [];
|
req.params.domains = [];
|
||||||
req.api('/domains', function(data) {
|
req.api('/domains', function(data) {
|
||||||
req.params.domains = data.Domains;
|
req.params.domains = data.domains;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
sam.before(/apps\/install\//, function (req){
|
sam.before(/apps\/install\//, function (req){
|
||||||
// Preload users lists.
|
// Preload users lists.
|
||||||
req.params.users = [];
|
req.params.users = [];
|
||||||
req.api('/users', function(data) {
|
req.api('/users', function(data) {
|
||||||
req.params.users = data.Users;
|
req.params.users = data.users;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -284,7 +316,7 @@ app = Sammy('#main', function (sam) {
|
||||||
sam.get('#/', function (c) {
|
sam.get('#/', function (c) {
|
||||||
c.api('/users', function(data) {
|
c.api('/users', function(data) {
|
||||||
// Warn admin if no users are created.
|
// Warn admin if no users are created.
|
||||||
if (data.Users.length == 0) {
|
if (data.users.length == 0) {
|
||||||
c.flash('warning', y18n.t('warning_first_user'));
|
c.flash('warning', y18n.t('warning_first_user'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -299,17 +331,16 @@ app = Sammy('#main', function (sam) {
|
||||||
// Check if te client is hosted on a yunohost node
|
// Check if te client is hosted on a yunohost node
|
||||||
domain = window.location.hostname
|
domain = window.location.hostname
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'https://'+ domain +'/yunohost/api/api',
|
dataType: "json",
|
||||||
|
url: 'https://'+ domain +'/yunohost/api/installed',
|
||||||
timeout: 3000
|
timeout: 3000
|
||||||
})
|
})
|
||||||
.success(function() {
|
.success(function(data) {
|
||||||
$.getJSON('https://'+ domain +'/yunohost/api/installed', function(data) {
|
if (!data.installed) {
|
||||||
if (!data.installed) {
|
c.redirect('#/postinstall');
|
||||||
c.redirect('#/postinstall');
|
} else {
|
||||||
} else {
|
c.view('login', { 'domain': domain });
|
||||||
c.view('login', { 'domain': domain });
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
})
|
})
|
||||||
.fail(function() {
|
.fail(function() {
|
||||||
c.view('login');
|
c.view('login');
|
||||||
|
@ -318,12 +349,14 @@ app = Sammy('#main', function (sam) {
|
||||||
|
|
||||||
sam.post('#/login', function (c) {
|
sam.post('#/login', function (c) {
|
||||||
store.set('url', 'https://'+ c.params['domain'] +'/yunohost/api');
|
store.set('url', 'https://'+ c.params['domain'] +'/yunohost/api');
|
||||||
store.set('user', 'admin');
|
// c.api('/api', function(data) {
|
||||||
store.set('password', btoa(c.params['password']));
|
// if (data.apiVersion) {
|
||||||
c.api('/api', function(data) {
|
params = {
|
||||||
if (data.apiVersion) {
|
'password': c.params['password']
|
||||||
c.api('/users', function(data) {
|
}
|
||||||
|
c.api('/login', function(data) {
|
||||||
store.set('connected', true);
|
store.set('connected', true);
|
||||||
|
|
||||||
$('.logout-button').fadeIn();
|
$('.logout-button').fadeIn();
|
||||||
c.flash('success', y18n.t('logged_in'));
|
c.flash('success', y18n.t('logged_in'));
|
||||||
if (store.get('path')) {
|
if (store.get('path')) {
|
||||||
|
@ -331,26 +364,26 @@ app = Sammy('#main', function (sam) {
|
||||||
} else {
|
} else {
|
||||||
c.redirect('#/');
|
c.redirect('#/');
|
||||||
}
|
}
|
||||||
});
|
}, 'POST', params);
|
||||||
} else {
|
// } else {
|
||||||
c.flash('fail', y18n.t('non_compatible_api'));
|
// c.flash('fail', y18n.t('non_compatible_api'));
|
||||||
c.redirect('#/login');
|
// c.redirect('#/login');
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
});
|
});
|
||||||
|
|
||||||
sam.get('#/logout', function (c) {
|
sam.get('#/logout', function (c) {
|
||||||
store.clear('url');
|
c.api('/logout', function (data) {
|
||||||
store.clear('user');
|
store.clear('url');
|
||||||
store.clear('password');
|
store.clear('connected');
|
||||||
store.clear('connected');
|
store.set('path', '#/');
|
||||||
store.set('path', '#/');
|
c.flash('success', y18n.t('logged_out'));
|
||||||
c.flash('success', y18n.t('logged_out'));
|
c.redirect('#/login');
|
||||||
c.redirect('#/login');
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
sam.get('#/postinstall', function(c) {
|
sam.get('#/postinstall', function(c) {
|
||||||
c.view('postinstall', {'DDomains': ['.nohost.me', '.noho.st']});
|
c.view('postinstall', {'ddomains': ['.nohost.me', '.noho.st']});
|
||||||
});
|
});
|
||||||
|
|
||||||
sam.post('#/postinstall', function (c) {
|
sam.post('#/postinstall', function (c) {
|
||||||
|
@ -408,7 +441,7 @@ app = Sammy('#main', function (sam) {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
c.params['mail'] = c.params['email'] + c.params['domain'];
|
c.params['mail'] = c.params['email'] + c.params['domain'];
|
||||||
c.api('/users', function(data) { // http://api.yunohost.org/#!/user/user_create_post_2
|
c.api('/user', function(data) { // http://api.yunohost.org/#!/user/user_create_post_2
|
||||||
c.redirect('#/users');
|
c.redirect('#/users');
|
||||||
}, 'POST', c.params.toHash());
|
}, 'POST', c.params.toHash());
|
||||||
}
|
}
|
||||||
|
@ -420,13 +453,13 @@ app = Sammy('#main', function (sam) {
|
||||||
});
|
});
|
||||||
|
|
||||||
sam.get('#/users/:user', function (c) {
|
sam.get('#/users/:user', function (c) {
|
||||||
c.api('/users/'+ c.params['user'], function(data) { // http://api.yunohost.org/#!/user/user_info_get_0
|
c.api('/user/'+ c.params['user'], function(data) { // http://api.yunohost.org/#!/user/user_info_get_0
|
||||||
c.view('user/user_info', data);
|
c.view('user/user_info', data);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
sam.get('#/users/:user/edit', function (c) {
|
sam.get('#/users/:user/edit', function (c) {
|
||||||
c.api('/users/'+ c.params['user'], function(data) { // http://api.yunohost.org/#!/user/user_info_get_0
|
c.api('/user/'+ c.params['user'], function(data) { // http://api.yunohost.org/#!/user/user_info_get_0
|
||||||
c.view('user/user_edit', data);
|
c.view('user/user_edit', data);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -450,7 +483,7 @@ app = Sammy('#main', function (sam) {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
params['change_password'] = params['password'];
|
params['change_password'] = params['password'];
|
||||||
c.api('/users/'+ c.params['user'], function(data) { // http://api.yunohost.org/#!/user/user_update_put_1
|
c.api('/user/update/'+ c.params['user'], function(data) { // http://api.yunohost.org/#!/user/user_update_put_1
|
||||||
c.redirect('#/users/'+ c.params['user']);
|
c.redirect('#/users/'+ c.params['user']);
|
||||||
}, 'PUT', params);
|
}, 'PUT', params);
|
||||||
}
|
}
|
||||||
|
@ -460,7 +493,7 @@ app = Sammy('#main', function (sam) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
c.api('/users/'+ c.params['user'], function(data) { // http://api.yunohost.org/#!/user/user_update_put_1
|
c.api('/user/update/'+ c.params['user'], function(data) { // http://api.yunohost.org/#!/user/user_update_put_1
|
||||||
c.redirect('#/users/'+ c.params['user']);
|
c.redirect('#/users/'+ c.params['user']);
|
||||||
}, 'PUT', params);
|
}, 'PUT', params);
|
||||||
}
|
}
|
||||||
|
@ -469,7 +502,7 @@ app = Sammy('#main', function (sam) {
|
||||||
|
|
||||||
sam.get('#/users/:user/delete', function (c) {
|
sam.get('#/users/:user/delete', function (c) {
|
||||||
if (confirm(y18n.t('confirm_delete', [c.params['user']]))) {
|
if (confirm(y18n.t('confirm_delete', [c.params['user']]))) {
|
||||||
c.api('/users/'+ c.params['user'], function(data) { // http://api.yunohost.org/#!/user/user_delete_delete_4
|
c.api('/user/delete/'+ c.params['user'], function(data) { // http://api.yunohost.org/#!/user/user_delete_delete_4
|
||||||
c.redirect('#/users');
|
c.redirect('#/users');
|
||||||
}, 'DELETE');
|
}, 'DELETE');
|
||||||
} else {
|
} else {
|
||||||
|
@ -487,7 +520,7 @@ app = Sammy('#main', function (sam) {
|
||||||
c.api('/domains', function(data) { // http://api.yunohost.org/#!/domain/domain_list_get_2
|
c.api('/domains', function(data) { // http://api.yunohost.org/#!/domain/domain_list_get_2
|
||||||
c.api('/domain/main', function(data2) {
|
c.api('/domain/main', function(data2) {
|
||||||
domains = [];
|
domains = [];
|
||||||
$.each(data.Domains, function(k, domain) {
|
$.each(data.domains, function(k, domain) {
|
||||||
domains.push({
|
domains.push({
|
||||||
url: domain,
|
url: domain,
|
||||||
main: (domain == data2.current_main_domain) ? true : false
|
main: (domain == data2.current_main_domain) ? true : false
|
||||||
|
@ -495,14 +528,14 @@ app = Sammy('#main', function (sam) {
|
||||||
})
|
})
|
||||||
|
|
||||||
// Sort domains with main domain first
|
// Sort domains with main domain first
|
||||||
domains.sort(function(a, b){ return -2*(a.main) + 1; })
|
domains.sort(function(a, b){ return -2*(a.main) + 1; });
|
||||||
c.view('domain/domain_list', {domains: domains});
|
c.view('domain/domain_list', {domains: domains});
|
||||||
}, 'PUT')
|
}, 'PUT');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
sam.get('#/domains/add', function (c) {
|
sam.get('#/domains/add', function (c) {
|
||||||
c.view('domain/domain_add', {'DDomains': ['.nohost.me', '.noho.st']});
|
c.view('domain/domain_add', {'ddomains': ['.nohost.me', '.noho.st']});
|
||||||
});
|
});
|
||||||
|
|
||||||
sam.post('#/domains/add', function (c) {
|
sam.post('#/domains/add', function (c) {
|
||||||
|
@ -517,14 +550,14 @@ app = Sammy('#main', function (sam) {
|
||||||
params = { 'domains': c.params['domain'] }
|
params = { 'domains': c.params['domain'] }
|
||||||
}
|
}
|
||||||
|
|
||||||
c.api('/domains', function(data) { // http://api.yunohost.org/#!/domain/domain_add_post_1
|
c.api('/domain/create', function(data) { // http://api.yunohost.org/#!/domain/domain_add_post_1
|
||||||
c.redirect('#/domains');
|
c.redirect('#/domains');
|
||||||
}, 'POST', params);
|
}, 'POST', params);
|
||||||
});
|
});
|
||||||
|
|
||||||
sam.get('#/domains/:domain/delete', function (c) {
|
sam.get('#/domains/:domain/delete', function (c) {
|
||||||
if (confirm(y18n.t('confirm_delete', [c.params['domain']]))) {
|
if (confirm(y18n.t('confirm_delete', [c.params['domain']]))) {
|
||||||
c.api('/domains/'+ c.params['domain'], function(data) { // http://api.yunohost.org/#!/domain/domain_remove_delete_3
|
c.api('/domain/delete/'+ c.params['domain'], function(data) { // http://api.yunohost.org/#!/domain/domain_remove_delete_3
|
||||||
store.clear('slide');
|
store.clear('slide');
|
||||||
c.redirect('#/domains');
|
c.redirect('#/domains');
|
||||||
}, 'DELETE');
|
}, 'DELETE');
|
||||||
|
@ -569,9 +602,9 @@ app = Sammy('#main', function (sam) {
|
||||||
sam.get('#/apps', function (c) {
|
sam.get('#/apps', function (c) {
|
||||||
c.api('/apps', function(data) { // http://api.yunohost.org/#!/app/app_list_get_8
|
c.api('/apps', function(data) { // http://api.yunohost.org/#!/app/app_list_get_8
|
||||||
// Keep only installed apps
|
// Keep only installed apps
|
||||||
data2 = { 'Apps': [], 'Installed': true }
|
data2 = { 'apps': [], 'installed': true }
|
||||||
$.each(data['Apps'], function(k, v) {
|
$.each(data['apps'], function(k, v) {
|
||||||
if (v['Installed']) data2['Apps'].push(v);
|
if (v['installed']) data2['apps'].push(v);
|
||||||
});
|
});
|
||||||
c.view('app/app_list', data2);
|
c.view('app/app_list', data2);
|
||||||
});
|
});
|
||||||
|
@ -579,34 +612,35 @@ app = Sammy('#main', function (sam) {
|
||||||
|
|
||||||
sam.get('#/apps/install', function (c) {
|
sam.get('#/apps/install', function (c) {
|
||||||
c.api('/apps', function(data) { // http://api.yunohost.org/#!/app/app_list_get_8
|
c.api('/apps', function(data) { // http://api.yunohost.org/#!/app/app_list_get_8
|
||||||
c.api('/apps?raw=true', function(dataraw) { // http://api.yunohost.org/#!/app/app_list_get_8
|
c.api('/apps?raw', function(dataraw) { // http://api.yunohost.org/#!/app/app_list_get_8
|
||||||
// Keep only uninstalled apps
|
// Keep only uninstalled apps
|
||||||
data2 = { 'Apps': [] }
|
data2 = { 'apps': [] }
|
||||||
$.each(data['Apps'], function(k, v) {
|
$.each(data['apps'], function(k, v) {
|
||||||
if (dataraw[v['ID']].manifest.multi_instance) v['Installed'] = false;
|
if (dataraw[v['id']].manifest.multi_instance) v['installed'] = false;
|
||||||
if (!v['Installed'] && !v['ID'].match(/__[0-9]{1,5}$/)) data2['Apps'].push(v);
|
if (!v['installed'] && !v['id'].match(/__[0-9]{1,5}$/)) data2['apps'].push(v);
|
||||||
|
});
|
||||||
|
c.view('app/app_list', data2);
|
||||||
});
|
});
|
||||||
c.view('app/app_list', data2);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
sam.get('#/apps/refresh', function (c) {
|
sam.get('#/apps/refresh', function (c) {
|
||||||
c.api('/app/lists', function(data) { // http://api.yunohost.org/#!/app/app_fetchlist_put_5
|
c.api('/applist/refresh', function(data) { // http://api.yunohost.org/#!/app/app_fetchlist_put_5
|
||||||
c.redirect(store.get('path'));
|
// c.redirect(store.get('path'));
|
||||||
|
c.redirect('#/apps/install');
|
||||||
}, 'PUT');
|
}, 'PUT');
|
||||||
});
|
});
|
||||||
|
|
||||||
sam.get('#/apps/:app', function (c) {
|
sam.get('#/apps/:app', function (c) {
|
||||||
c.api('/app/'+c.params['app']+'?raw=true', function(data) { // http://api.yunohost.org/#!/app/app_info_get_9
|
c.api('/app/'+c.params['app']+'?raw', function(data) { // http://api.yunohost.org/#!/app/app_info_get_9
|
||||||
// Presentation
|
// Presentation
|
||||||
data.settings.allowed_users = data.settings.allowed_users.replace(',', ', ');
|
data.settings.allowed_users = (data.settings.allowed_users) ? data.settings.allowed_users.replace(',', ', ') : '';
|
||||||
c.view('app/app_info', data);
|
c.view('app/app_info', data);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
sam.get('#/apps/install/:app', function (c) {
|
sam.get('#/apps/install/:app', function (c) {
|
||||||
c.api('/apps?raw=true', function(data) { // http://api.yunohost.org/#!/app/app_list_get_8
|
c.api('/applist?raw', function(data) { // http://api.yunohost.org/#!/app/app_list_get_8
|
||||||
appData = data[c.params['app']];
|
appData = data[c.params['app']];
|
||||||
|
|
||||||
$.each(appData.manifest.arguments.install, function(k, v) {
|
$.each(appData.manifest.arguments.install, function(k, v) {
|
||||||
|
@ -641,8 +675,8 @@ app = Sammy('#main', function (sam) {
|
||||||
if (v.name == 'admin') {
|
if (v.name == 'admin') {
|
||||||
$.each(c.params.users, function(key, user){
|
$.each(c.params.users, function(key, user){
|
||||||
appData.manifest.arguments.install[k].allowedValues.push({
|
appData.manifest.arguments.install[k].allowedValues.push({
|
||||||
value: user.Username,
|
value: user.username,
|
||||||
label: user.Fullname+' ('+user.Mail+')'
|
label: user.fullname+' ('+user.mail+')'
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
appData.manifest.arguments.install[k].help = "<a href='#/users'>Manage users</a>";
|
appData.manifest.arguments.install[k].help = "<a href='#/users'>Manage users</a>";
|
||||||
|
@ -658,14 +692,14 @@ app = Sammy('#main', function (sam) {
|
||||||
delete c.params['label'];
|
delete c.params['label'];
|
||||||
delete c.params['app'];
|
delete c.params['app'];
|
||||||
params['args'] = c.serialize(c.params.toHash());
|
params['args'] = c.serialize(c.params.toHash());
|
||||||
c.api('/app', function() { // http://api.yunohost.org/#!/app/app_install_post_2
|
c.api('/app/install', function() { // http://api.yunohost.org/#!/app/app_install_post_2
|
||||||
c.redirect('#/apps');
|
c.redirect('#/apps');
|
||||||
}, 'POST', params);
|
}, 'POST', params);
|
||||||
});
|
});
|
||||||
|
|
||||||
sam.get('#/apps/:app/uninstall', function (c) {
|
sam.get('#/apps/:app/uninstall', function (c) {
|
||||||
if (confirm(y18n.t('confirm_uninstall', [c.params['app']]))) {
|
if (confirm(y18n.t('confirm_uninstall', [c.params['app']]))) {
|
||||||
c.api('/app?app='+ c.params['app'], function() { // http://api.yunohost.org/#!/app/app_remove_delete_4
|
c.api('/app/delete?app='+ c.params['app'], function() { // http://api.yunohost.org/#!/app/app_remove_delete_4
|
||||||
c.redirect('#/apps');
|
c.redirect('#/apps');
|
||||||
}, 'DELETE');
|
}, 'DELETE');
|
||||||
} else {
|
} else {
|
||||||
|
@ -676,7 +710,7 @@ app = Sammy('#main', function (sam) {
|
||||||
|
|
||||||
// Manage app access
|
// Manage app access
|
||||||
sam.get('#/apps/:app/access', function (c) {
|
sam.get('#/apps/:app/access', function (c) {
|
||||||
c.api('/app/'+c.params['app']+'?raw=true', function(data) { // http://api.yunohost.org/#!/app/app_info_get_9
|
c.api('/app/'+c.params['app']+'?raw', function(data) { // http://api.yunohost.org/#!/app/app_info_get_9
|
||||||
c.api('/users', function(dataUsers) {
|
c.api('/users', function(dataUsers) {
|
||||||
|
|
||||||
// allowed_users as array
|
// allowed_users as array
|
||||||
|
@ -697,19 +731,19 @@ app = Sammy('#main', function (sam) {
|
||||||
|
|
||||||
// Available users
|
// Available users
|
||||||
data.users = [];
|
data.users = [];
|
||||||
$.each(dataUsers.Users, function(key, user){
|
$.each(dataUsers.users, function(key, user){
|
||||||
// Do not list allowed_users in select list
|
// Do not list allowed_users in select list
|
||||||
if ( data.settings.allowed_users.indexOf(user.Username) === -1 ) {
|
if ( data.settings.allowed_users.indexOf(user.username) === -1 ) {
|
||||||
data.users.push({
|
data.users.push({
|
||||||
value: user.Username,
|
value: user.username,
|
||||||
label: user.Fullname+' ('+user.Mail+')'
|
label: user.fullname+' ('+user.mail+')'
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// Complete allowed_users data
|
// Complete allowed_users data
|
||||||
data.settings.allowed_users[data.settings.allowed_users.indexOf(user.Username)] = {
|
data.settings.allowed_users[data.settings.allowed_users.indexOf(user.username)] = {
|
||||||
username: user.Username,
|
username: user.username,
|
||||||
fullname: user.Fullname,
|
fullname: user.fullname,
|
||||||
mail: user.Mail,
|
mail: user.mail,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -723,7 +757,7 @@ app = Sammy('#main', function (sam) {
|
||||||
sam.get('#/apps/:app/access/remove', function (c) {
|
sam.get('#/apps/:app/access/remove', function (c) {
|
||||||
if (confirm(y18n.t('confirm_access_remove_all', [c.params['app']]))) {
|
if (confirm(y18n.t('confirm_access_remove_all', [c.params['app']]))) {
|
||||||
params = {'apps': c.params['app'], 'users':[]}
|
params = {'apps': c.params['app'], 'users':[]}
|
||||||
c.api('/app/access?'+c.serialize(params), function(data) { // http://api.yunohost.org/#!/app/app_removeaccess_delete_12
|
c.api('/app/access/delete?'+c.serialize(params), function(data) { // http://api.yunohost.org/#!/app/app_removeaccess_delete_12
|
||||||
store.clear('slide');
|
store.clear('slide');
|
||||||
c.redirect('#/apps/'+ c.params['app']+ '/access');
|
c.redirect('#/apps/'+ c.params['app']+ '/access');
|
||||||
}, 'DELETE', params);
|
}, 'DELETE', params);
|
||||||
|
@ -737,7 +771,7 @@ app = Sammy('#main', function (sam) {
|
||||||
sam.get('#/apps/:app/access/remove/:user', function (c) {
|
sam.get('#/apps/:app/access/remove/:user', function (c) {
|
||||||
if (confirm(y18n.t('confirm_access_remove_user', [c.params['app'], c.params['user']]))) {
|
if (confirm(y18n.t('confirm_access_remove_user', [c.params['app'], c.params['user']]))) {
|
||||||
params = {'apps': c.params['app'], 'users': c.params['user']}
|
params = {'apps': c.params['app'], 'users': c.params['user']}
|
||||||
c.api('/app/access?'+c.serialize(params), function(data) { // http://api.yunohost.org/#!/app/app_removeaccess_delete_12
|
c.api('/app/access/delete?'+c.serialize(params), function(data) { // http://api.yunohost.org/#!/app/app_removeaccess_delete_12
|
||||||
store.clear('slide');
|
store.clear('slide');
|
||||||
c.redirect('#/apps/'+ c.params['app']+ '/access');
|
c.redirect('#/apps/'+ c.params['app']+ '/access');
|
||||||
}, 'DELETE', params); // passing 'params' here is useless because jQuery doesn't handle ajax datas for DELETE requests. Passing parameters through uri.
|
}, 'DELETE', params); // passing 'params' here is useless because jQuery doesn't handle ajax datas for DELETE requests. Passing parameters through uri.
|
||||||
|
@ -751,7 +785,7 @@ app = Sammy('#main', function (sam) {
|
||||||
sam.get('#/apps/:app/access/add', function (c) {
|
sam.get('#/apps/:app/access/add', function (c) {
|
||||||
if (confirm(y18n.t('confirm_access_add', [c.params['app']]))) {
|
if (confirm(y18n.t('confirm_access_add', [c.params['app']]))) {
|
||||||
params = {'apps': c.params['app'], 'users': null}
|
params = {'apps': c.params['app'], 'users': null}
|
||||||
c.api('/app/access', function() { // http://api.yunohost.org/#!/app/app_addaccess_put_13
|
c.api('/app/access/grant', function() { // http://api.yunohost.org/#!/app/app_addaccess_put_13
|
||||||
store.clear('slide');
|
store.clear('slide');
|
||||||
c.redirect('#/apps/'+ c.params['app'] +'/access');
|
c.redirect('#/apps/'+ c.params['app'] +'/access');
|
||||||
}, 'PUT', params);
|
}, 'PUT', params);
|
||||||
|
@ -764,7 +798,7 @@ app = Sammy('#main', function (sam) {
|
||||||
// Grant access for a specific user
|
// Grant access for a specific user
|
||||||
sam.post('#/apps/:app/access/add', function (c) {
|
sam.post('#/apps/:app/access/add', function (c) {
|
||||||
params = {'users': c.params['user'], 'apps': c.params['app']}
|
params = {'users': c.params['user'], 'apps': c.params['app']}
|
||||||
c.api('/app/access', function() { // http://api.yunohost.org/#!/app/app_addaccess_put_13
|
c.api('/app/access/grant', function() { // http://api.yunohost.org/#!/app/app_addaccess_put_13
|
||||||
store.clear('slide');
|
store.clear('slide');
|
||||||
c.redirect('#/apps/'+ c.params['app'] +'/access');
|
c.redirect('#/apps/'+ c.params['app'] +'/access');
|
||||||
}, 'PUT', params);
|
}, 'PUT', params);
|
||||||
|
@ -774,7 +808,7 @@ app = Sammy('#main', function (sam) {
|
||||||
sam.get('#/apps/:app/access/clear', function (c) {
|
sam.get('#/apps/:app/access/clear', function (c) {
|
||||||
if (confirm(y18n.t('confirm_access_clear', [c.params['app']]))) {
|
if (confirm(y18n.t('confirm_access_clear', [c.params['app']]))) {
|
||||||
params = {'apps': c.params['app']}
|
params = {'apps': c.params['app']}
|
||||||
c.api('/app/access', function() { //
|
c.api('/app/access/clear', function() { //
|
||||||
store.clear('slide');
|
store.clear('slide');
|
||||||
c.redirect('#/apps/'+ c.params['app'] +'/access');
|
c.redirect('#/apps/'+ c.params['app'] +'/access');
|
||||||
}, 'POST', params);
|
}, 'POST', params);
|
||||||
|
@ -848,10 +882,13 @@ app = Sammy('#main', function (sam) {
|
||||||
sam.get('#/services/:service/:action', function (c) {
|
sam.get('#/services/:service/:action', function (c) {
|
||||||
if (confirm(y18n.t('confirm_service_action', [y18n.t(c.params['action']), c.params['service']]))) {
|
if (confirm(y18n.t('confirm_service_action', [y18n.t(c.params['action']), c.params['service']]))) {
|
||||||
params = { 'names': c.params['service'] }
|
params = { 'names': c.params['service'] }
|
||||||
|
|
||||||
|
var method = (c.params['action'] == 'start' || c.params['action'] == 'enable') ? 'PUT' : 'DELETE';
|
||||||
|
|
||||||
c.api('/service/'+ c.params['action'], function(data) {
|
c.api('/service/'+ c.params['action'], function(data) {
|
||||||
store.clear('slide');
|
store.clear('slide');
|
||||||
c.redirect('#/services/'+ c.params['service']);
|
c.redirect('#/services/'+ c.params['service']);
|
||||||
}, 'GET', params);
|
}, method, params);
|
||||||
} else {
|
} else {
|
||||||
store.clear('slide');
|
store.clear('slide');
|
||||||
c.redirect('#/services/'+ c.params['service']);
|
c.redirect('#/services/'+ c.params['service']);
|
||||||
|
@ -934,7 +971,7 @@ app = Sammy('#main', function (sam) {
|
||||||
// Update password and redirect to the home
|
// Update password and redirect to the home
|
||||||
c.api('/adminpw', function(data) { // http://api.yunohost.org/#!/tools/tools_adminpw_put_3
|
c.api('/adminpw', function(data) { // http://api.yunohost.org/#!/tools/tools_adminpw_put_3
|
||||||
store.set('password', btoa(params['new_password']));
|
store.set('password', btoa(params['new_password']));
|
||||||
c.redirect('#/');
|
c.redirect('#/logout');
|
||||||
}, 'PUT', params);
|
}, 'PUT', params);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
"password_empty" : "Password field is empty",
|
"password_empty" : "Password field is empty",
|
||||||
"logged_in" : "Logged in",
|
"logged_in" : "Logged in",
|
||||||
"logged_out" : "Logged out",
|
"logged_out" : "Logged out",
|
||||||
|
"unauthorized" : "Unauthorized",
|
||||||
"error_occured" : "An error occured, try again",
|
"error_occured" : "An error occured, try again",
|
||||||
"error_server" : "Server error",
|
"error_server" : "Server error",
|
||||||
"error_select_domain" : "You should indicate a domain",
|
"error_select_domain" : "You should indicate a domain",
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
"password_empty" : "Le champ mot de passe est vide",
|
"password_empty" : "Le champ mot de passe est vide",
|
||||||
"logged_in" : "Connecté",
|
"logged_in" : "Connecté",
|
||||||
"logged_out" : "Déconnecté",
|
"logged_out" : "Déconnecté",
|
||||||
|
"unauthorized" : "Non autorisé",
|
||||||
"error_occured" : "Une erreur est survenue, veuillez réessayer.",
|
"error_occured" : "Une erreur est survenue, veuillez réessayer.",
|
||||||
"error_server" : "Erreur serveur",
|
"error_server" : "Erreur serveur",
|
||||||
"error_select_domain" : "Vous devez indiquer un domaine.",
|
"error_select_domain" : "Vous devez indiquer un domaine.",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{{#Installed}}
|
{{#installed}}
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
<a href="#/" class="btn btn-default slide back">
|
<a href="#/" class="btn btn-default slide back">
|
||||||
<span class="fa-chevron-left"></span> {{t 'menu'}}
|
<span class="fa-chevron-left"></span> {{t 'menu'}}
|
||||||
|
@ -11,10 +11,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
<h1 class="view-title">{{t 'installed_apps'}}</h1>
|
<h1 class="view-title">{{t 'installed_apps'}}</h1>
|
||||||
{{/Installed}}
|
{{/installed}}
|
||||||
|
|
||||||
|
|
||||||
{{^Installed}}
|
{{^installed}}
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
<a href="#/apps" class="btn btn-default slide back">
|
<a href="#/apps" class="btn btn-default slide back">
|
||||||
<span class="fa-chevron-left"></span> {{t 'installed_apps'}}
|
<span class="fa-chevron-left"></span> {{t 'installed_apps'}}
|
||||||
|
@ -27,24 +27,24 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
<h1 class="view-title">{{t 'available_apps'}}</h1>
|
<h1 class="view-title">{{t 'available_apps'}}</h1>
|
||||||
{{/Installed}}
|
{{/installed}}
|
||||||
|
|
||||||
<div class="br"></div>
|
<div class="br"></div>
|
||||||
|
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
{{#Apps}}
|
{{#apps}}
|
||||||
<a href="#/apps/{{^Installed}}install/{{/Installed}}{{ID}}" class="list-group-item slide">
|
<a href="#/apps/{{^installed}}install/{{/installed}}{{id}}" class="list-group-item slide">
|
||||||
<span class="fa-chevron-right pull-right"></span>
|
<span class="fa-chevron-right pull-right"></span>
|
||||||
<h2 class="list-group-item-heading">{{Name}} <small>{{ID}}</small></h2>
|
<h2 class="list-group-item-heading">{{name}} <small>{{id}}</small></h2>
|
||||||
<p class="list-group-item-text">{{Description.en}}</p>
|
<p class="list-group-item-text">{{description.en}}</p>
|
||||||
</a>
|
</a>
|
||||||
{{/Apps}}
|
{{/apps}}
|
||||||
|
|
||||||
{{^Apps}}
|
{{^apps}}
|
||||||
<div class="alert alert-warning">
|
<div class="alert alert-warning">
|
||||||
<span class="fa-exclamation-triangle"></span>
|
<span class="fa-exclamation-triangle"></span>
|
||||||
{{t 'no_installed_apps'}}
|
{{t 'no_installed_apps'}}
|
||||||
</div>
|
</div>
|
||||||
{{/Apps}}
|
{{/apps}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h4 class="panel-title">
|
<h4 class="panel-title">
|
||||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo">
|
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo">
|
||||||
{{t 'domain_add_panel_with_domain'}}
|
{{t 'domain_add_panel_without_domain'}}
|
||||||
</a>
|
</a>
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
|
@ -52,9 +52,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-5 col-xs-6">
|
<div class="col-sm-5 col-xs-6">
|
||||||
<select class="form-control" name="ddomain-ext">
|
<select class="form-control" name="ddomain-ext">
|
||||||
{{#DDomains}}
|
{{#ddomains}}
|
||||||
<option>{{.}}</option>
|
<option>{{.}}</option>
|
||||||
{{/DDomains}}
|
{{/ddomains}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -57,9 +57,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-5 col-xs-6">
|
<div class="col-sm-5 col-xs-6">
|
||||||
<select class="form-control" name="ddomain-ext">
|
<select class="form-control" name="ddomain-ext">
|
||||||
{{#DDomains}}
|
{{#ddomains}}
|
||||||
<option>{{.}}</option>
|
<option>{{.}}</option>
|
||||||
{{/DDomains}}
|
{{/ddomains}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -37,9 +37,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-5 col-xs-6">
|
<div class="col-sm-5 col-xs-6">
|
||||||
<select class="form-control" name="domain">
|
<select class="form-control" name="domain">
|
||||||
{{#Domains}}
|
{{#domains}}
|
||||||
<option>@{{.}}</option>
|
<option>@{{.}}</option>
|
||||||
{{/Domains}}
|
{{/domains}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,37 +1,37 @@
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
<a href="#/users/{{Username}}" class="btn btn-default slide back">
|
<a href="#/users/{{username}}" class="btn btn-default slide back">
|
||||||
<span class="fa-chevron-left"></span> {{t 'info'}}
|
<span class="fa-chevron-left"></span> {{t 'info'}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
<h1 class="view-title">{{t 'user_username_edit' Username}}</h1>
|
<h1 class="view-title">{{t 'user_username_edit' username}}</h1>
|
||||||
|
|
||||||
<div class="br"></div>
|
<div class="br"></div>
|
||||||
|
|
||||||
<form action="#/users/{{Username}}" method="PUT" class="form-horizontal">
|
<form action="#/users/{{username}}" method="PUT" class="form-horizontal">
|
||||||
|
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="username" class="col-sm-3 control-label">{{t 'user_username'}}</label>
|
<label for="username" class="col-sm-3 control-label">{{t 'user_username'}}</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" name="username" class="form-control" placeholder="{{Username}}" disabled>
|
<input type="text" name="username" class="form-control" placeholder="{{username}}" disabled>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="firstname" class="col-sm-3 control-label">{{t 'user_fullname'}}</label>
|
<label for="firstname" class="col-sm-3 control-label">{{t 'user_fullname'}}</label>
|
||||||
<div class="clearfix visible-xs"></div>
|
<div class="clearfix visible-xs"></div>
|
||||||
<div class="col-sm-4 col-xs-6">
|
<div class="col-sm-4 col-xs-6">
|
||||||
<input type="text" name="firstname" class="form-control" placeholder="{{Firstname}}">
|
<input type="text" name="firstname" class="form-control" placeholder="{{firstname}}">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-5 col-xs-6">
|
<div class="col-sm-5 col-xs-6">
|
||||||
<input type="text" name="lastname" class="form-control" placeholder="{{Lastname}}">
|
<input type="text" name="lastname" class="form-control" placeholder="{{lastname}}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="mail" class="col-sm-3 control-label">{{t 'user_email'}}</label>
|
<label for="mail" class="col-sm-3 control-label">{{t 'user_email'}}</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="email" name="mail" class="form-control" placeholder="{{Mail}}">
|
<input type="email" name="mail" class="form-control" placeholder="{{mail}}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<a href="#/users/{{Username}}/edit" class="btn btn-info slide">
|
<a href="#/users/{{username}}/edit" class="btn btn-info slide">
|
||||||
<span class="fa-edit"></span> {{t 'user_username_edit' Username}}
|
<span class="fa-edit"></span> {{t 'user_username_edit' username}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
<h1 class="view-title">{{Username}}</h1>
|
<h1 class="view-title">{{username}}</h1>
|
||||||
|
|
||||||
<div class="br"></div>
|
<div class="br"></div>
|
||||||
|
|
||||||
|
@ -18,27 +18,27 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-3 text-right hidden-xs"><strong>{{t 'user_username'}}</strong></div>
|
<div class="col-sm-3 text-right hidden-xs"><strong>{{t 'user_username'}}</strong></div>
|
||||||
<div class="col-sm-3 visible-xs"><strong>{{t 'user_username'}}</strong></div>
|
<div class="col-sm-3 visible-xs"><strong>{{t 'user_username'}}</strong></div>
|
||||||
<div class="col-sm-9"> {{Username}}</div>
|
<div class="col-sm-9"> {{username}}</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-3 text-right hidden-xs"><strong>{{t 'user_fullname'}}</strong></div>
|
<div class="col-sm-3 text-right hidden-xs"><strong>{{t 'user_fullname'}}</strong></div>
|
||||||
<div class="col-sm-3 visible-xs"><strong>{{t 'user_fullname'}}</strong></div>
|
<div class="col-sm-3 visible-xs"><strong>{{t 'user_fullname'}}</strong></div>
|
||||||
<div class="col-sm-9"> {{Fullname}}</div>
|
<div class="col-sm-9"> {{fullname}}</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-3 text-right hidden-xs"><strong>{{t 'user_email'}}</strong></div>
|
<div class="col-sm-3 text-right hidden-xs"><strong>{{t 'user_email'}}</strong></div>
|
||||||
<div class="col-sm-3 visible-xs"><strong>{{t 'user_email'}}</strong></div>
|
<div class="col-sm-3 visible-xs"><strong>{{t 'user_email'}}</strong></div>
|
||||||
<div class="col-sm-9"> {{Mail}}</div>
|
<div class="col-sm-9"> {{mail}}</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<a href="#/users/{{Username}}/delete" class="btn btn-danger slide back">
|
<a href="#/users/{{username}}/delete" class="btn btn-danger slide back">
|
||||||
<span class="fa-trash-o"></span> {{t 'delete'}}
|
<span class="fa-trash-o"></span> {{t 'delete'}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -13,19 +13,19 @@
|
||||||
<div class="br"></div>
|
<div class="br"></div>
|
||||||
|
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
{{#Users}}
|
{{#users}}
|
||||||
<a href="#/users/{{Username}}" class="list-group-item slide clearfix">
|
<a href="#/users/{{username}}" class="list-group-item slide clearfix">
|
||||||
<span class="pull-right fa-chevron-right"></span>
|
<span class="pull-right fa-chevron-right"></span>
|
||||||
<h2 class="list-group-item-heading">{{Username}} <small>{{Fullname}}</small></h2>
|
<h2 class="list-group-item-heading">{{username}} <small>{{fullname}}</small></h2>
|
||||||
<p class="list-group-item-text">{{Mail}}</p>
|
<p class="list-group-item-text">{{mail}}</p>
|
||||||
</a>
|
</a>
|
||||||
{{/Users}}
|
{{/users}}
|
||||||
|
|
||||||
{{^Users}}
|
{{^users}}
|
||||||
<div class="alert alert-warning">
|
<div class="alert alert-warning">
|
||||||
<span class="fa-exclamation-triangle"></span>
|
<span class="fa-exclamation-triangle"></span>
|
||||||
{{t 'users_no'}}
|
{{t 'users_no'}}
|
||||||
</div>
|
</div>
|
||||||
{{/Users}}
|
{{/users}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue