[enh] port new apps in progress display to english version

This commit is contained in:
Laurent Peuch 2016-04-19 06:50:36 +02:00
parent 28bd11fd0a
commit cab13d1c8d

View file

@ -29,11 +29,23 @@ The packagers will appreciate your remarks. If you test them and find issues, or
<div class="btn btn-default btn-xs pull-right" data-toggle="collapse" data-target="#app-accordion2 .collapse">View all</div>
</div>
<h2>Declared as working applications</h2>
<p><b style="color: red">Important: it's the application maintaineur that qualify his application as working, not the YunoHost core team. Install it at your own risks. We won't provide support for it.</b></p>
<div class="panel-group" id="app-accordion2"></div>
<div class="panel-group" id="app-accordion2-working"></div>
<h2>Work in progress applications</h2>
<p>Those are <b>not yet finished</b> applications, we <b>strongly advise against installing them</b> except if you know what you are doing.</p>
<div class="panel-group" id="app-accordion2-inprogress"></div>
<h2>Borken applications</h2>
<p>Do <b>NOT</b> install them, they are here as reference while they aren't fixed.</p>
<div class="panel-group" id="app-accordion2-notworking"></div>
<script type="text/template" id="app-template2">
<div class="panel panel-default">
<div class="panel panel-default panel-{app_state_bootstrap}">
<div class="panel-heading">
<div class="panel-title">
<a data-toggle="collapse" data-parent="#app-accordion" href="apps_in_progress/#app_{app_id}">{app_name} <em><small>({app_id})</small></em></a>
@ -41,7 +53,6 @@ The packagers will appreciate your remarks. If you test them and find issues, or
</div>
<div class="panel-collapse collapse app_{app_id}">
<div class="panel-body">
<div class="{app_state}"/>
<p><strong>Description</strong>: {app_description}</p>
<p><strong>Last update (UTC)</strong>: {app_update}</p>
<p><strong>Maintainer</strong>: {app_maintainer} <small class="text-muted">({app_mail})</small></p>
@ -78,6 +89,14 @@ $(document).ready(function () {
});
$.each(app_list, function(k, infos) {
app_id = infos.manifest.id;
if (infos.state === "working") {
app_state_bootstrap = "default";
} else if (infos.state === "inprogress") {
app_state_bootstrap = "warning";
} else if (infos.state === "notworking") {
app_state_bootstrap = "danger";
}
html = $('#app-template2').html()
.replace(/{app_id}/g, app_id)
.replace(/{app_name}/g, infos.manifest.name)
@ -86,6 +105,7 @@ $(document).ready(function () {
.replace('{app_branch}', infos.git.branch)
.replace('{app_update}', timeConverter(infos.lastUpdate))
.replace('{app_state}', infos.state)
.replace('{app_state_bootstrap}', app_state_bootstrap)
.replace('{app_license}', infos.manifest.license);
if (infos.manifest.developer) {
@ -100,20 +120,8 @@ $(document).ready(function () {
.replace('{app_mail}', infos.manifest.maintainer.email);
}
$('#app-accordion2').append(html);
$('#app-accordion2-' + infos.state).append(html);
$('.app_'+ app_id).attr('id', 'app_'+ app_id);
setTimeout(function() {
$(".notworking").each(function() {
$(this).html( '<a class="btn btn-small btn-danger disabled" href="#">Not working</a>' );
});
$(".inprogress").each(function() {
$(this).html( '<a class="btn btn-small btn-warning disabled" href="#">In progress</a>' );
});
$(".working").each(function() {
$(this).html( '<a class="btn btn-small btn-success disabled" href="#">Working</a>' );
});
}, 3000);
});
});
});