annotate gpp/templates/polls/poll_vote.html @ 445:e9f203c5f5bb

Attempting to fix #218; update the topic last visit time with 'now' when viewing the last page of a topic, otherwise use the creation time of the last post on the page.
author Brian Neal <bgneal@gmail.com>
date Wed, 08 Jun 2011 00:24:41 +0000
parents 1f139de929c4
children 8f46ba2f1b81
rev   line source
gremmie@1 1 {% extends 'base.html' %}
bgneal@310 2 {% load url from future %}
gremmie@1 3 {% block title %}Polls: {{ poll.question }}{% endblock %}
gremmie@1 4 {% block custom_css %}
bgneal@312 5 <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/polls.css" />
gremmie@1 6 {% endblock %}
gremmie@1 7 {% block content %}
gremmie@1 8 <h2>Poll</h2>
bgneal@439 9 <h3>Voting Booth: {{ poll.question }}</h3>
bgneal@439 10 {% if user_choice %}
bgneal@439 11 <p>You voted for &quot;{{ user_choice.choice }}&quot;.</p>
bgneal@439 12 <form action="{% url 'polls-delete_vote' %}" method="post">{% csrf_token %}
gremmie@1 13 <div class="poll-form">
bgneal@439 14 <input type="hidden" name="poll_id" value="{{ poll.id }}" />
bgneal@439 15 <input type="submit" value="Delete My Vote!" />
gremmie@1 16 </div>
gremmie@1 17 </form>
bgneal@439 18 {% else %}
bgneal@439 19 <form action="." method="post">{% csrf_token %}
bgneal@439 20 <div class="poll-form">
bgneal@439 21 {{ vote_form.as_p }}
bgneal@439 22 <input type="submit" value="Vote" />
bgneal@439 23 </div>
bgneal@439 24 </form>
bgneal@439 25 {% endif %}
gremmie@1 26 <p class="poll-nav">
gremmie@1 27 <a href="{{ poll.get_absolute_url }}">Poll Details</a>
bgneal@439 28 | <a href="{% url 'polls-results' poll.id %}">View Results</a>
bgneal@439 29 | <a href="{% url 'polls-main' %}">All Polls</a>
gremmie@1 30 </p>
gremmie@1 31 <p>This poll was published on {{ poll.start_date|date:"F d, Y" }}.</p>
gremmie@1 32 {% endblock %}