Mercurial > public > sg101
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gpp/templates/polls/poll.html Mon Apr 06 02:43:12 2009 +0000 @@ -0,0 +1,31 @@ +{% extends 'base.html' %} +{% 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> +{% get_comment_count for poll as comment_count %} +<p> +This poll has <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.views.poll_results poll.id %}">View Results & Comments</a> +{% if poll.is_open and user.is_authenticated %} +| <a href="{% url polls.views.poll_vote poll_id=poll.id %}">Vote</a> +{% endif %} +| <a href="{% url polls.views.poll_index %}">Poll Index</a> +</p> +{% endblock %}