26 lines
1,023 B
HTML
Executable file
26 lines
1,023 B
HTML
Executable file
{% extends "polls/event_detail_base.html" %}
|
|
{% load staticfiles %}
|
|
{% load bootstrap3 %}
|
|
|
|
{% block event_nav_polls %}active{% endblock %}
|
|
{% block event_content %}
|
|
{% if object.polls.all %}
|
|
{% for poll in object.polls.all %}
|
|
<h3>Poll: {{ poll.question_text }} (<a href="{% url 'polls:view-poll' event_id=event.id poll_num=forloop.counter %}">Edit</a>)</h3>
|
|
<br/>
|
|
<h4>Poll Options:</h4>
|
|
<ul class="list-group">
|
|
{% for option in poll.options.all %}
|
|
<li class="list-group-item">{{ option.choice_text }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
<p>Minimum Number of Option Selections: {{ poll.min_num_selections }}. Maximum Number of Option Selections: {{ poll.max_num_selections }}.</p>
|
|
<hr/>
|
|
{% endfor %}
|
|
{% else %}
|
|
<p>No polls are available for this Event.</p>
|
|
{% endif %}
|
|
{% if is_organiser %}
|
|
<a href="{% url 'polls:create-poll' event.id %}" class="btn btn-default" role="button">Add Poll</a>
|
|
{% endif %}
|
|
{% endblock %}
|