2016-06-12 17:57:31 +02:00
|
|
|
{% extends "base_title.html" %}
|
2016-07-27 15:29:06 +02:00
|
|
|
{% load staticfiles %}
|
2016-06-12 17:57:31 +02:00
|
|
|
|
|
|
|
{% block realcontent %}
|
|
|
|
<h2>{{ spectacle }}</h2>
|
2016-07-27 15:29:06 +02:00
|
|
|
<table class='table table-striped etat-bda'>
|
2016-06-12 17:57:31 +02:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2016-07-27 15:29:06 +02:00
|
|
|
<th data-sort="string">Nom</th>
|
|
|
|
<th data-sort="int">Places</th>
|
|
|
|
<th data-sort="string">Adresse Mail</th>
|
|
|
|
<th data-sort="string">Payé</th>
|
|
|
|
<th data-sort="string">Donné</th>
|
2016-06-12 17:57:31 +02:00
|
|
|
</tr>
|
|
|
|
</thead>
|
2016-07-27 15:29:06 +02:00
|
|
|
<tbody>
|
2016-06-12 17:57:31 +02:00
|
|
|
{% for participant in participants %}
|
2016-07-27 15:29:06 +02:00
|
|
|
<tr>
|
|
|
|
<td data-sort-value="{{ participan.name}}">{{participant.name}}</td>
|
|
|
|
<td data-sort-value="{{participant.nb_places}}">{{participant.nb_places}} place{{participant.nb_places|pluralize}}</td>
|
|
|
|
<td data-sort-value="{{participant.email}}">{{participant.email}}</td>
|
|
|
|
<td data-sort-value="{{ participant.paid}}" class={%if participant.paid %}"greenratio"{%else%}"redratio"{%endif%}>
|
|
|
|
{% if participant.paid %}Oui{% else %}Non{%endif%}
|
|
|
|
</td>
|
|
|
|
<td data-sort-value="{{participant.given}}" class={%if participant.given == participant.nb_places %}"greenratio"
|
|
|
|
{%elif participant.given == 0%}"redratio"
|
|
|
|
{%else%}"orangeratio"
|
|
|
|
{%endif%}>
|
|
|
|
{% if participant.given == participant.nb_places %}Oui
|
|
|
|
{% elif participant.given == 0 %}Non
|
|
|
|
{% else %}{{participant.given}}/{{participant.nb_places}}
|
|
|
|
{%endif%}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
2016-06-12 17:57:31 +02:00
|
|
|
</table>
|
2016-07-27 14:00:38 +02:00
|
|
|
<h3><a href="{% url "admin:bda_attribution_add" %}?spectacle={{spectacle.id}}"><span class="glyphicon glyphicon-plus-sign"></span> Ajouter une attribution</a></h3>
|
2016-06-15 21:21:13 +02:00
|
|
|
<br>
|
2016-07-27 14:00:38 +02:00
|
|
|
<button class="btn btn-default" type="button" onclick="toggle('export-mails')">Afficher/Cacher mails participants</button>
|
2016-06-12 17:57:31 +02:00
|
|
|
<pre id="export-mails" style="display:none">
|
2016-06-15 19:34:10 +02:00
|
|
|
{%for participant in participants %}{{participant.email}}, {%endfor%}
|
2016-06-12 17:57:31 +02:00
|
|
|
</pre>
|
|
|
|
<br>
|
2016-07-27 14:00:38 +02:00
|
|
|
<button class="btn btn-default" type="button" onclick="toggle('export-salle')">Afficher/Cacher liste noms</button>
|
2016-06-12 17:57:31 +02:00
|
|
|
<pre id="export-salle" style="display:none">
|
2016-06-25 03:37:28 +02:00
|
|
|
{% for participant in participants %}{{participant.name}} : {{participant.nb_places}} places
|
2016-06-12 17:57:31 +02:00
|
|
|
{% endfor %}
|
|
|
|
</pre>
|
|
|
|
|
2016-07-27 15:29:06 +02:00
|
|
|
<script type="text/javascript"
|
|
|
|
src="{% static "js/joequery-Stupid-Table-Plugin/stupidtable.js" %}"></script>
|
|
|
|
<script>
|
|
|
|
function toggle(id) {
|
|
|
|
var pre = document.getElementById(id) ;
|
|
|
|
pre.style.display = pre.style.display == "none" ? "block" : "none" ;
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(function(){
|
|
|
|
$("table.etat-bda").stupidtable();
|
|
|
|
});
|
|
|
|
</script>
|
2016-06-12 17:57:31 +02:00
|
|
|
|
|
|
|
{% endblock %}
|