n'utilise plus de tags pour l'affichage Oui/Non

This commit is contained in:
ludo 2016-06-12 20:54:12 +02:00
parent 825269067c
commit a1580cc7a2
2 changed files with 6 additions and 9 deletions

View file

@ -22,12 +22,12 @@
<td>{{participant.user.email}}</td> <td>{{participant.user.email}}</td>
<td> <td>
<div class={%if participant.paid %}"greenratio"{%else%}"redratio"{%endif%}> <div class={%if participant.paid %}"greenratio"{%else%}"redratio"{%endif%}>
{{participant.paid|oui_ou_non}} {% if participant.paid %}Oui{% else %}Non{%endif%}
</div> </div>
</td> </td>
<td align="center"> <td align="center">
<div class={%if participant.given %}"greenratio"{%else%}"redratio"{%endif%}> <div class={%if participant.given %}"greenratio"{%else%}"redratio"{%endif%}>
{{participant.given|oui_ou_non}} {% if participant.given %}Oui{% else %}Non{%endif%}
</div> </div>
</td> </td>
@ -40,11 +40,13 @@
</pre> </pre>
<br> <br>
<button type="button" onclick="toggle('export-salle')">Afficher/Cacher liste noms</button> <button type="button" onclick="toggle('export-salle')">Afficher/Cacher liste noms</button>
{% spaceless %}
<pre id="export-salle" style="display:none"> <pre id="export-salle" style="display:none">
{% for participant in participants %}{{participant.user.get_full_name}}{% if participant.nb_places == 2 %} {% for participant in participants %}{{participant.user.get_full_name}}{% if participant.nb_places == 2 %}
{{participant.user.get_full_name}}{%endif%} {{participant.user.get_full_name}}{%endif%}
{% endfor %} {% endfor %}
</pre> </pre>
{%endspaceless%}
<script> <script>
function toggle(id) { function toggle(id) {

View file

@ -35,9 +35,4 @@ def highlight_clipper(clipper, q):
text = clipper.username text = clipper.username
return highlight_text(text, q) return highlight_text(text, q)
@register.filter
def oui_ou_non(b):
if b:
return "Oui"
else:
return "Non"