ScoDoc/app/templates/dept_news.j2

47 lines
1016 B
Plaintext
Raw Permalink Normal View History

{# -*- mode: jinja-html -*- #}
{% extends "sco_page.j2" %}
{% block styles %}
{{super()}}
{% endblock %}
{% block app_content %}
<h2>Opérations dans le département {{g.scodoc_dept}}</h2>
<table id="dept_news" class="table table-striped">
<thead>
<tr>
<th>Date</th>
<th>Type</th>
<th>Auteur</th>
<th>Détail</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
{% endblock %}
{% block scripts %}
{{super()}}
<script>
$(document).ready(function () {
$('#dept_news').DataTable({
ajax: '{{url_for("scolar.dept_news_json", scodoc_dept=g.scodoc_dept)}}',
serverSide: true,
columns: [
{
data: {
_: "date.display",
sort: "date.timestamp"
}
},
{ data: 'type', searchable: false },
{ data: 'authenticated_user', orderable: false, searchable: true },
{ data: 'text', orderable: false, searchable: true }
],
"order": [[0, "desc"]]
});
});
</script>
{% endblock %}