1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-25 17:17:12 +00:00
bazarr/views/systemreleases.html

56 lines
1.7 KiB
HTML
Raw Normal View History

2020-02-17 00:38:10 +00:00
{% extends '_main.html' %}
{% block title %}Releases - Bazarr{% endblock %}
2021-01-27 16:29:08 +00:00
{% block head %}
<style>
.badge {
vertical-align: text-bottom;
margin-left: 10px;
}
</style>
{% endblock head %}
2020-02-17 00:38:10 +00:00
{% block bcleft %}
{% endblock bcleft %}
{% block bcright %}
{% endblock bcright %}
{% block body %}
2020-02-19 03:34:22 +00:00
<div class="container-fluid" style="padding-top: 3em;">
2020-02-17 00:38:10 +00:00
<span id="releases"></span>
</div>
{% endblock body %}
{% block tail %}
<script>
$(document).ready(function () {
$.ajax({
url: "{{ url_for('api.systemreleases') }}"
}).done(function (data) {
var releases = '';
data.data.forEach(appendFunc);
function appendFunc(value) {
entries = '';
2021-01-27 16:29:08 +00:00
value['body'].forEach(appendEntry);
releases = releases + '<h3 style="display:inline;">'+value['name']+'</h3>'
releases += ' — '+value['date']
releases += ((value['prerelease']) ? '<span class="badge badge-danger">Development</span>' : '<span class="badge badge-info">Master</span>')
releases += ((value['current']) ? '<span class="badge badge-secondary">Currently Installed</span>' : '')
releases += '</h4><hr/><p><b>From newest to oldest:</b></p><ul>'+entries+'</ul>';
2020-02-17 00:38:10 +00:00
function appendEntry(entry) {
entries = entries + '<li>'+entry.replace(/(\s\[.*?\])\(.*?\)/, '')+'</li>'; // removing the commit url
2020-02-17 00:38:10 +00:00
}
}
$('#releases').html(releases);
});
})
</script>
{% endblock tail %}