gremmie@1: {% extends 'base.html' %}
bgneal@310: {% load url from future %}
gremmie@1: {% load comment_tags %}
gremmie@1: {% block title %}Polls: {{ poll.question }}{% endblock %}
gremmie@1: {% block content %}
gremmie@1: <h2>Poll</h2>
gremmie@1: <h3>{{ poll.question }}</h3>
gremmie@1: <ul class="poll-detail">
gremmie@1: {% for choice in poll.choice_set.all %}
gremmie@1:    <li>{{ choice.choice }}</li>
gremmie@1: {% endfor %}
gremmie@1: </ul>
bgneal@439: {% if user_choice %}
bgneal@439: <p>You voted for &quot;{{ user_choice.choice }}&quot;.</p>
bgneal@439: {% endif %}
gremmie@1: {% get_comment_count for poll as comment_count %}
gremmie@1: <p>
bgneal@440: This poll has {{ poll.total_votes }} vote{{ poll.total_votes|pluralize }} and 
bgneal@440: <a href="{% url 'polls.views.poll_results' poll.id %}">{{ comment_count }} comment{{ comment_count|pluralize }}</a>.
gremmie@1: {% if poll.is_open %}
gremmie@1: Voting for this poll started on {{ poll.start_date|date:"F d, Y" }}. 
gremmie@1:    {% if poll.end_date %}
gremmie@1:       Voting will end on {{ poll.end_date|date:"F d, Y" }}.
gremmie@1:    {% endif %}
gremmie@1: {% else %}
gremmie@1: This poll ran from {{ poll.start_date|date:"F d, Y" }} to {{ poll.end_date|date:"F d, Y" }}.
gremmie@1: {% endif %}
gremmie@1: </p>
gremmie@1: <p class="poll-nav">
bgneal@439: <a href="{% url 'polls-results' poll.id %}">View Results &amp; Comments</a> 
gremmie@1: {% if poll.is_open and user.is_authenticated %}
bgneal@439: | <a href="{% url 'polls-vote' poll_id=poll.id %}">Vote</a>
gremmie@1: {% endif %}
bgneal@439: | <a href="{% url 'polls-main' %}">All Polls</a>
gremmie@1: </p>
gremmie@1: {% endblock %}