mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[enh] Application info & installation (presentation and translation).
This commit is contained in:
parent
32bd01fc36
commit
344146c8ed
7 changed files with 55 additions and 21 deletions
|
@ -336,3 +336,11 @@ select option[default] {
|
|||
top: 50%;
|
||||
margin-top: -0.5em;
|
||||
}
|
||||
|
||||
|
||||
.dl-horizontal {
|
||||
dt,
|
||||
dd {
|
||||
min-height: 1.5em;
|
||||
}
|
||||
}
|
2
css/style.min.css
vendored
2
css/style.min.css
vendored
File diff suppressed because one or more lines are too long
17
js/app.js
17
js/app.js
|
@ -711,6 +711,15 @@ app = Sammy('#main', function (sam) {
|
|||
c.api('/apps/'+c.params['app']+'?raw', function(data) { // http://api.yunohost.org/#!/app/app_info_get_9
|
||||
// Presentation
|
||||
data.settings.allowed_users = (data.settings.allowed_users) ? data.settings.allowed_users.replace(',', ', ') : '';
|
||||
|
||||
// Multilingual description
|
||||
if (window.navigator && window.navigator.language) {
|
||||
data.description = (typeof data.manifest.description[window.navigator.language] !== 'indefined') ?
|
||||
data.manifest.description[window.navigator.language] :
|
||||
data.manifest.description['en']
|
||||
;
|
||||
}
|
||||
|
||||
c.view('app/app_info', data);
|
||||
});
|
||||
});
|
||||
|
@ -759,6 +768,14 @@ app = Sammy('#main', function (sam) {
|
|||
}
|
||||
});
|
||||
|
||||
// Multilingual description
|
||||
if (window.navigator && window.navigator.language) {
|
||||
appData.description = (typeof appData.manifest.description[window.navigator.language] !== 'indefined') ?
|
||||
appData.manifest.description[window.navigator.language] :
|
||||
appData.manifest.description['en']
|
||||
;
|
||||
}
|
||||
|
||||
c.view('app/app_install', appData);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
"start" : "Start",
|
||||
"stop" : "Stop",
|
||||
"log" : "Log",
|
||||
"yes" : "Yes",
|
||||
"no" : "No",
|
||||
|
||||
"installing" : "Installing",
|
||||
"installed" : "Installed",
|
||||
|
@ -101,6 +103,7 @@
|
|||
"app_access_addall_btn" : "Add access to all",
|
||||
"app_access_removeall_btn" : "Remove all access",
|
||||
"app_access_clearall_btn" : "Clear all access",
|
||||
"multi_instance" : "Multi instance",
|
||||
|
||||
"backup" : "Backup",
|
||||
"backup_warning_title" : "The backup system is not implemented yet.",
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
"start" : "Démarrer",
|
||||
"stop" : "Arrêter",
|
||||
"log" : "Journal",
|
||||
"yes" : "Oui",
|
||||
"no" : "Non",
|
||||
|
||||
"installing" : "Installing",
|
||||
"installed" : "Installé",
|
||||
|
@ -101,6 +103,7 @@
|
|||
"app_access_addall_btn" : "Ajouter l'accès à tous les utilisateurs",
|
||||
"app_access_removeall_btn" : "Supprimer tous les accès",
|
||||
"app_access_clearall_btn" : "Effacer toutes les règles accès",
|
||||
"multi_instance" : "Multi instance",
|
||||
|
||||
"backup" : "Sauvegarde",
|
||||
"backup_warning_title" : "Le système de sauvegarde n'est pas encore implémenté.",
|
||||
|
|
|
@ -19,9 +19,9 @@
|
|||
<dt>{{t 'id'}}</dt>
|
||||
<dd>{{settings.id}}</dd>
|
||||
<dt>{{t 'description'}}</dt>
|
||||
<dd>{{manifest.description.en}}</dd>
|
||||
<dt>{{t 'mode'}}</dt>
|
||||
<dd>{{settings.mode}}</dd>
|
||||
<dd>{{description}}</dd>
|
||||
<dt>{{t 'multi_instance'}}</dt>
|
||||
<dd>{{#if manifest.multi_instance}}{{t 'yes'}}{{else}}{{t 'no'}}{{/if}}</dd>
|
||||
<dt>{{t 'url'}}</dt>
|
||||
<dd><a href="https://{{settings.domain}}{{settings.path}}" target="_blank">https://{{settings.domain}}{{settings.path}}</a></dd>
|
||||
</dl>
|
||||
|
|
|
@ -10,24 +10,27 @@
|
|||
|
||||
<form action="#/apps" method="POST" class="form-horizontal">
|
||||
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">
|
||||
<div class="row">
|
||||
<div class="col-sm-3 text-right hidden-xs"><strong>{{t 'id'}}</strong></div>
|
||||
<div class="col-sm-3 visible-xs"><strong>{{t 'id'}}</strong></div>
|
||||
<div class="col-sm-9"> {{manifest.id}}</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<div class="row">
|
||||
<div class="col-sm-3 text-right hidden-xs"><strong>{{t 'description'}}</strong></div>
|
||||
<div class="col-sm-3 visible-xs"><strong>{{t 'description'}}</strong></div>
|
||||
<div class="col-sm-9"> {{manifest.description.en}}</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h2 class="panel-title"><span class="fa-fw fa-info-circle"></span> {{t 'infos'}}</h2>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>{{t 'id'}}</dt>
|
||||
<dd>{{manifest.id}}</dd>
|
||||
<dt>{{t 'description'}}</dt>
|
||||
<dd>{{description}}</dd>
|
||||
<dt>{{t 'multi_instance'}}</dt>
|
||||
<dd>{{#if manifest.multi_instance}}{{t 'yes'}}{{else}}{{t 'no'}}{{/if}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h2 class="panel-title"><span class="fa-fw fa-download"></span> {{t 'install'}}</h2>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label for="label" class="col-sm-12">{{t 'label_for_manifestname' manifest.name}}</label>
|
||||
|
|
Loading…
Add table
Reference in a new issue