Vue listant les participants à un spectacle, avec quelques exports : liste des mails, et export des noms pour les salles
This commit is contained in:
parent
d424089a55
commit
185c7b5ca4
1 changed files with 72 additions and 0 deletions
72
bda/templates/bda-participants.html
Normal file
72
bda/templates/bda-participants.html
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
{% extends "base_title.html" %}
|
||||||
|
{% load utils %}
|
||||||
|
|
||||||
|
{% block realcontent %}
|
||||||
|
<h2>{{ spectacle }}</h2>
|
||||||
|
<table class='etat-bda' align="center">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Nom</th>
|
||||||
|
<th>Clipper</th>
|
||||||
|
<th>Places</th>
|
||||||
|
<th>Adresse Mail</th>
|
||||||
|
<th>Payé</th>
|
||||||
|
<th>Donné</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
{% for participant in participants %}
|
||||||
|
<tr>
|
||||||
|
<td>{{participant.user.get_full_name}}</td>
|
||||||
|
<td>{{participant.user.username}}</td>
|
||||||
|
<td>{{participant.nb_places}} place{{participant.nb_places|pluralize:",s"}}</td>
|
||||||
|
<td>{{participant.user.email}}</td>
|
||||||
|
<td>
|
||||||
|
<div class={%if participant.paid %}"greenratio"{%else%}"redratio"{%endif%}>
|
||||||
|
{{participant.paid|oui_ou_non}}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<div class={%if participant.given %}"greenratio"{%else%}"redratio"{%endif%}>
|
||||||
|
{{participant.given|oui_ou_non}}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
<form action="{% url 'bda-add-attrib' spectacle.tirage.id spectacle.id %}" method="POST">
|
||||||
|
{% csrf_token %}
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td><input type="text" name="clipper" size=8></td>
|
||||||
|
<td><select name="nb_places">
|
||||||
|
<option value=1>1 place</option>
|
||||||
|
<option value=2>2 places</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td align="center"><input type="checkbox" name="given"></td>
|
||||||
|
<td><input type="submit" value="Ajouter"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<button type="button" onclick="toggle('export-mails')">Afficher/Cacher mails participants</button>
|
||||||
|
<pre id="export-mails" style="display:none">
|
||||||
|
{%for participant in participants %}{{participant.user.email}}, {%endfor%}
|
||||||
|
</pre>
|
||||||
|
<br>
|
||||||
|
<button type="button" onclick="toggle('export-salle')">Afficher/Cacher liste noms</button>
|
||||||
|
<pre id="export-salle" style="display:none">
|
||||||
|
{% for participant in participants %}{{participant.user.get_full_name}} {% if participant.nb_places == 2 %}
|
||||||
|
{{participant.user.get_full_name}}{%endif%}
|
||||||
|
{% endfor %}
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function toggle(id) {
|
||||||
|
var pre = document.getElementById(id) ;
|
||||||
|
pre.style.display = pre.style.display == "none" ? "block" : "none" ;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{% endblock %}
|
Loading…
Reference in a new issue