1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-25 01:02:19 +00:00
bazarr/views/historymovies.html
Louis Vézina d32bb22e2d WIP
2020-02-09 22:36:40 -05:00

73 lines
3.1 KiB
HTML

{% extends '_main.html' %}
{% block title %}History (Movies) - Bazarr{% endblock %}
{% block bcleft %}
{% endblock bcleft %}
{% block bcright %}
{% endblock bcright %}
{% block body %}
<table id="history_movies" class="table table-striped" style="width:100%">
<thead>
<tr>
<th>action</th>
<th>title</th>
<th>timestamp</th>
<th>description</th>
</tr>
</thead>
</table>
{% endblock body %}
{% block tail %}
<script>
$(document).ready(function () {
var table = $('#history_movies').DataTable({
"processing": false,
"serverSide": true,
"searching": false,
"ordering": false,
"responsive": true,
"lengthChange": false,
"pageLength": {{ settings.general.page_size }},
"ajax": "{{ url_for('api.historymovies') }}",
"columns": [
{"data": "action",
"render": function(data) {
if (data === 0) {
return "<i class='fas fa-trash' title='Subtitle file has been erased.' data-toggle='tooltip' data-placement='right'></i>";
} else if (data === 1) {
return "<i class='fas fa-download' title='Subtitle file has been downloaded.' data-toggle='tooltip' data-placement='right'></i>";
} else if (data === 2) {
return "<i class='fas fa-user' title='Subtitle file has been manually downloaded.' data-toggle='tooltip' data-placement='right'></i>";
} else if (data === 3) {
return "<i class='fas fa-recycle' title='Subtitle file has been upgraded.' data-toggle='tooltip' data-placement='right'></i>";
} else if (data === 4) {
return "<i class='fas fa-cloud-upload-alt' title='Subtitle file has been manually uploaded.' data-toggle='tooltip' data-placement='right'></i>";
}
}
},
{"data": null,
"render": function (data) {
return '<a href="' + "{{ url_for( 'movie', no='tempvalue' ) }}".replace("tempvalue", data.radarrId) + '">' + data.title + '</a>';
}
},
{"data": "timestamp"},
{"data": null,
"render": function (data) {
if (data.upgradable) {
return "<i class='fas fa-recycle' title='This Subtitles File Is Eligible For An Upgrade.' style='color: green;' data-toggle='tooltip' data-placement='right'></i> " + data.description;
} else {
return data.description;
}
}
}
]
});
});
</script>
{% endblock tail %}