view 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
line wrap: on
line source
{% extends 'base.html' %}
{% load url from future %}
{% block title %}Polls: {{ poll.question }}{% endblock %}
{% block custom_css %}
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/polls.css" />
{% endblock %}
{% block content %}
<h2>Poll</h2>
<h3>Voting Booth: {{ poll.question }}</h3>
{% if user_choice %}
<p>You voted for &quot;{{ user_choice.choice }}&quot;.</p>
<form action="{% url 'polls-delete_vote' %}" method="post">{% csrf_token %}
   <div class="poll-form">
      <input type="hidden" name="poll_id" value="{{ poll.id }}" />
      <input type="submit" value="Delete My Vote!" />
   </div>
</form>
{% else %}
   <form action="." method="post">{% csrf_token %}
      <div class="poll-form">
      {{ vote_form.as_p }}
      <input type="submit" value="Vote" />
      </div>
   </form>
{% endif %}
<p class="poll-nav">
<a href="{{ poll.get_absolute_url }}">Poll Details</a>
| <a href="{% url 'polls-results' poll.id %}">View Results</a>
| <a href="{% url 'polls-main' %}">All Polls</a>
</p>
<p>This poll was published on {{ poll.start_date|date:"F d, Y" }}.</p>
{% endblock %}