ScoDoc/app/templates/formsemestre/list_saisies_notes.j2

48 lines
1.2 KiB
Plaintext
Raw Normal View History

{% extends "sco_page.j2" %}
{% block styles %}
{{super()}}
<style>
.export_xls_but {
margin-left: 32px;
}
</style>
{% endblock %}
{% block app_content %}
<h2 class="formsemestre">{{title_h2}}</h2>
<div>{{table.get_nb_rows()}}
{% if only_modifs %}modifications{% else %}saisies{% endif %}
de notes dans ce semestre.
</div>
<form id="filter-form">
<label>
<input type="checkbox" id="only-modifs-checkbox" name="only_modifs" value="1"
{% if only_modifs %}checked{% endif %}>
Lister uniquement les modifications
</label>
<span class="export_xls_but">{{table.xls_export_button()|safe}} excel</span>
</form>
{{table.html()|safe}}
{% endblock %}
{% block scripts %}
{{super()}}
<script>
document.getElementById('only-modifs-checkbox').addEventListener('change', function() {
var form = document.getElementById('filter-form');
var onlyModifs = this.checked ? '1' : '0';
var url = new URL(window.location.href);
url.searchParams.set('formsemestre_id', {{formsemestre_id}});
url.searchParams.set('only_modifs', onlyModifs);
window.location.href = url.toString();
});
</script>
{% endblock %}