2012-07-11 17:39:20 +02:00
|
|
|
{% extends "base_title.html" %}
|
|
|
|
{% load utils %}
|
|
|
|
|
2016-07-25 19:19:07 +02:00
|
|
|
{% block page_size %}col-sm-8{% endblock %}
|
|
|
|
|
2012-07-11 17:39:20 +02:00
|
|
|
{% block realcontent %}
|
2017-02-09 21:04:32 +01:00
|
|
|
<h2>Événement: {{ event.title }}{% if user.is_staff %} <a class="title-link" href="{% url 'admin:cof_event_change' event.id %}"><span class="glyphicon glyphicon-link"></span> Administration</a>{% endif %}</h2>
|
2012-07-11 17:39:20 +02:00
|
|
|
{% if event.details %}
|
|
|
|
<p>{{ event.details }}</p>
|
2016-07-25 19:19:07 +02:00
|
|
|
<hr/>
|
2012-07-11 17:39:20 +02:00
|
|
|
{% endif %}
|
|
|
|
{% include "tristate_js.html" %}
|
|
|
|
<h3>Filtres</h3>
|
2017-02-23 00:31:08 +01:00
|
|
|
<form method="post" action="{% url 'event.status' event.id %}">
|
2012-07-11 17:39:20 +02:00
|
|
|
{% csrf_token %}
|
|
|
|
{{ form.as_p }}
|
2016-07-25 19:19:07 +02:00
|
|
|
<input style="margin-top:10px;" type="submit" class="btn btn-primary" value="Filtrer" />
|
2012-07-11 17:39:20 +02:00
|
|
|
</form>
|
2016-07-25 19:19:07 +02:00
|
|
|
<hr/>
|
2012-07-11 17:39:20 +02:00
|
|
|
<h3>Résultats globaux</h3>
|
|
|
|
{% for option in options %}
|
|
|
|
<h4>{{ option.value }}</h4>
|
|
|
|
<ul>
|
|
|
|
{% for choice in option.choices.all %}
|
|
|
|
<li>{{ choice.value }} : {{ choices_count|key:choice.id }}</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endfor %}
|
2016-07-25 19:19:07 +02:00
|
|
|
<hr/>
|
2012-07-11 17:39:20 +02:00
|
|
|
<h3>Réponses individuelles</h3>
|
|
|
|
<ul>
|
|
|
|
{% for user_choice in user_choices %}{% with user_choice.user as auser %}
|
|
|
|
{% if user_choice.options.all %}
|
|
|
|
<li>
|
|
|
|
{% if auser.first_name and auser.last_name %}{{ auser.first_name }} {{ auser.last_name }}
|
|
|
|
{% else %}<tt>{{ auser.username }}</tt>{% endif %} :
|
|
|
|
<ul>
|
|
|
|
{% for choice in user_choice.options.all %}
|
|
|
|
<li>{{ choice.event_option.name }} : {{ choice.value }}</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
{% endwith %}{% endfor %}
|
|
|
|
</ul>
|
2016-07-25 19:19:07 +02:00
|
|
|
<hr/>
|
2013-09-05 22:20:52 +02:00
|
|
|
<h3>Mailing list</h3>
|
|
|
|
<textarea style="width: 100%; height: 100px; margin-top: 10px;">
|
|
|
|
{% spaceless %}{% for user_choice in user_choices %}{% with user_choice.user as auser %}{% if user_choice.options.all %}{% if auser.email %}{{ auser.email }}{% else %}{{ auser.username }}{% endif %}, {% endif %}{% endwith %}{% endfor %}
|
|
|
|
{% endspaceless %}</textarea>
|
2012-07-11 17:39:20 +02:00
|
|
|
{% endblock %}
|