view gpp/templates/polls/poll.html @ 442:6c182ceb7147

Fixing #217; upgrade TinyMCE to 3.4.2 and enable the paste plugin.
author Brian Neal <bgneal@gmail.com>
date Thu, 26 May 2011 00:43:49 +0000
parents ac9217eef610
children
line wrap: on
line source
{% extends 'base.html' %}
{% load url from future %}
{% load comment_tags %}
{% block title %}Polls: {{ poll.question }}{% endblock %}
{% block content %}
<h2>Poll</h2>
<h3>{{ poll.question }}</h3>
<ul class="poll-detail">
{% for choice in poll.choice_set.all %}
   <li>{{ choice.choice }}</li>
{% endfor %}
</ul>
{% if user_choice %}
<p>You voted for &quot;{{ user_choice.choice }}&quot;.</p>
{% endif %}
{% get_comment_count for poll as comment_count %}
<p>
This poll has {{ poll.total_votes }} vote{{ poll.total_votes|pluralize }} and 
<a href="{% url 'polls.views.poll_results' poll.id %}">{{ comment_count }} comment{{ comment_count|pluralize }}</a>.
{% if poll.is_open %}
Voting for this poll started on {{ poll.start_date|date:"F d, Y" }}. 
   {% if poll.end_date %}
      Voting will end on {{ poll.end_date|date:"F d, Y" }}.
   {% endif %}
{% else %}
This poll ran from {{ poll.start_date|date:"F d, Y" }} to {{ poll.end_date|date:"F d, Y" }}.
{% endif %}
</p>
<p class="poll-nav">
<a href="{% url 'polls-results' poll.id %}">View Results &amp; Comments</a> 
{% if poll.is_open and user.is_authenticated %}
| <a href="{% url 'polls-vote' poll_id=poll.id %}">Vote</a>
{% endif %}
| <a href="{% url 'polls-main' %}">All Polls</a>
</p>
{% endblock %}