Mercurial > public > sg101
comparison gpp/templates/polls/poll.html @ 1:dbd703f7d63a
Initial import of sg101 stuff from private repository.
author | gremmie |
---|---|
date | Mon, 06 Apr 2009 02:43:12 +0000 |
parents | |
children | daa2916f5b34 |
comparison
equal
deleted
inserted
replaced
0:900ba3c7b765 | 1:dbd703f7d63a |
---|---|
1 {% extends 'base.html' %} | |
2 {% load comment_tags %} | |
3 {% block title %}Polls: {{ poll.question }}{% endblock %} | |
4 {% block content %} | |
5 <h2>Poll</h2> | |
6 <h3>{{ poll.question }}</h3> | |
7 <ul class="poll-detail"> | |
8 {% for choice in poll.choice_set.all %} | |
9 <li>{{ choice.choice }}</li> | |
10 {% endfor %} | |
11 </ul> | |
12 {% get_comment_count for poll as comment_count %} | |
13 <p> | |
14 This poll has <a href="{% url polls.views.poll_results poll.id %}">{{ comment_count }} comment{{ comment_count|pluralize }}</a>. | |
15 {% if poll.is_open %} | |
16 Voting for this poll started on {{ poll.start_date|date:"F d, Y" }}. | |
17 {% if poll.end_date %} | |
18 Voting will end on {{ poll.end_date|date:"F d, Y" }}. | |
19 {% endif %} | |
20 {% else %} | |
21 This poll ran from {{ poll.start_date|date:"F d, Y" }} to {{ poll.end_date|date:"F d, Y" }}. | |
22 {% endif %} | |
23 </p> | |
24 <p class="poll-nav"> | |
25 <a href="{% url polls.views.poll_results poll.id %}">View Results & Comments</a> | |
26 {% if poll.is_open and user.is_authenticated %} | |
27 | <a href="{% url polls.views.poll_vote poll_id=poll.id %}">Vote</a> | |
28 {% endif %} | |
29 | <a href="{% url polls.views.poll_index %}">Poll Index</a> | |
30 </p> | |
31 {% endblock %} |