You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bazarr/views/historymovies.html

86 lines
3.6 KiB

5 years ago
{% extends '_main.html' %}
5 years ago
{% block title %}History (Movies) - Bazarr{% endblock %}
5 years ago
{% block bcleft %}
5 years ago
5 years ago
{% endblock bcleft %}
5 years ago
{% block bcright %}
5 years ago
5 years ago
{% endblock bcright %}
5 years ago
{% block body %}
5 years ago
<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>
5 years ago
{% endblock body %}
5 years ago
{% block tail %}
5 years ago
<script>
$(document).ready(function () {
var table = $('#history_movies').DataTable({
5 years ago
"processing": false,
5 years ago
"serverSide": true,
5 years ago
language: {
zeroRecords: 'Nothing Found In Movies History',
processing: "Loading Movies History..."
},
5 years ago
"searching": false,
"ordering": false,
5 years ago
"responsive": true,
5 years ago
"lengthChange": false,
5 years ago
"pageLength": {{ settings.general.page_size }},
5 years ago
"ajax": "{{ url_for('api.historymovies') }}",
"columns": [
5 years ago
{"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>';
}
},
5 years ago
{"data": "timestamp"},
5 years ago
{"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;
}
}
}
5 years ago
]
});
5 years ago
events.on('event', function(event) {
var event_json = JSON.parse(event);
if (event_json.type === 'movieHistory') {
$('#history_movies').DataTable().ajax.reload(resetPaging=false);
$('[data-toggle="tooltip"]').tooltip({html: true});
}
});
});
5 years ago
</script>
5 years ago
{% endblock tail %}