mirror of
https://github.com/YunoHost/doc.git
synced 2024-09-03 20:06:26 +02:00
Handle 'unmaintained' state on app page (#732)
This commit is contained in:
parent
a9d0cde6dd
commit
33738195d3
1 changed files with 29 additions and 13 deletions
26
apps.md
26
apps.md
|
@ -83,6 +83,10 @@
|
||||||
margin-top: -5px;
|
margin-top: -5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.app-card .unmaintained {
|
||||||
|
color: #e0aa33;
|
||||||
|
}
|
||||||
|
|
||||||
.app-card-desc {
|
.app-card-desc {
|
||||||
height:100px;
|
height:100px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -123,7 +127,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="app-card-date-maintainer">
|
<div class="app-card-date-maintainer">
|
||||||
<span class="glyphicon glyphicon-refresh"></span> {app_update} -
|
<span class="glyphicon glyphicon-refresh"></span> {app_update} -
|
||||||
<span class="glyphicon glyphicon-user"></span> {app_maintainer}
|
<span title="{maintained_help}" class="{maintained_state}"><span class="glyphicon glyphicon-{maintained_icon}"></span> {app_maintainer}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group" role="group">
|
<div class="btn-group" role="group">
|
||||||
<a href="{app_git}" target="_BLANK" type="button" class="btn btn-default col-sm-4"><span class="glyphicon glyphicon-globe" aria-hidden="true"></span> Code</a>
|
<a href="{app_git}" target="_BLANK" type="button" class="btn btn-default col-sm-4"><span class="glyphicon glyphicon-globe" aria-hidden="true"></span> Code</a>
|
||||||
|
@ -258,17 +262,30 @@ $(document).ready(function () {
|
||||||
.replace('{app_state_bootstrap}', app_state_bootstrap)
|
.replace('{app_state_bootstrap}', app_state_bootstrap)
|
||||||
.replace('{app_install_bootstrap}', app_install_bootstrap);
|
.replace('{app_install_bootstrap}', app_install_bootstrap);
|
||||||
|
|
||||||
|
if (infos.maintained == false)
|
||||||
|
{
|
||||||
|
html = html
|
||||||
|
.replace('{maintained_state}', 'unmaintained')
|
||||||
|
.replace('{maintained_icon}', 'warning-sign')
|
||||||
|
.replace('{app_maintainer}', "Unmaintained")
|
||||||
|
.replace('{maintained_help}', "This package is currently unmaintained. Feel free to propose yourself as the new maintainer !");
|
||||||
|
} else {
|
||||||
if (infos.manifest.developer) {
|
if (infos.manifest.developer) {
|
||||||
html = html
|
html = html
|
||||||
|
.replace('{maintained_state}', 'maintained')
|
||||||
|
.replace('{maintained_icon}', 'user')
|
||||||
.replace('{app_maintainer}', infos.manifest.developer.name)
|
.replace('{app_maintainer}', infos.manifest.developer.name)
|
||||||
.replace('{app_mail}', infos.manifest.developer.email);
|
.replace('{maintained_help}', "Current maintainer of this package");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (infos.manifest.maintainer) {
|
if (infos.manifest.maintainer) {
|
||||||
html = html
|
html = html
|
||||||
|
.replace('{maintained_state}', 'maintained')
|
||||||
|
.replace('{maintained_icon}', 'user')
|
||||||
.replace('{app_maintainer}', infos.manifest.maintainer.name)
|
.replace('{app_maintainer}', infos.manifest.maintainer.name)
|
||||||
.replace('{app_mail}', infos.manifest.maintainer.email);
|
.replace('{maintained_help}', "Current maintainer of this package");;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Fill the template
|
// Fill the template
|
||||||
$('#app-cards-list').append(html);
|
$('#app-cards-list').append(html);
|
||||||
|
@ -285,4 +302,3 @@ $(document).ready(function () {
|
||||||
//=================================================
|
//=================================================
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue