comparison gpp/templates/polls/poll_results.html @ 310:daa2916f5b34

Fixing 145; New url tag behavior (forwards compatibility) in Django 1.3.
author Brian Neal <bgneal@gmail.com>
date Thu, 20 Jan 2011 04:03:48 +0000
parents 2d299909e074
children 88b2b9cb8c1f
comparison
equal deleted inserted replaced
309:8a0bae48b6ca 310:daa2916f5b34
1 {% extends 'base.html' %} 1 {% extends 'base.html' %}
2 {% load url from future %}
2 {% load comment_tags %} 3 {% load comment_tags %}
3 {% load script_tags %} 4 {% load script_tags %}
4 {% block title %}Poll Results: {{ poll.question }}{% endblock %} 5 {% block title %}Poll Results: {{ poll.question }}{% endblock %}
5 {% block custom_css %} 6 {% block custom_css %}
6 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/polls.css" /> 7 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/polls.css" />
26 </dl> 27 </dl>
27 <p><strong>{{ total_votes }} total vote{{ total_votes|pluralize }}.</strong></p> 28 <p><strong>{{ total_votes }} total vote{{ total_votes|pluralize }}.</strong></p>
28 <p class="poll-nav"> 29 <p class="poll-nav">
29 <a href="{{ poll.get_absolute_url }}">Poll Details</a> 30 <a href="{{ poll.get_absolute_url }}">Poll Details</a>
30 {% if poll.is_open and user.is_authenticated %} 31 {% if poll.is_open and user.is_authenticated %}
31 | <a href="{% url polls.views.poll_vote poll_id=poll.id %}">Vote</a> 32 | <a href="{% url 'polls.views.poll_vote' poll_id=poll.id %}">Vote</a>
32 {% endif %} 33 {% endif %}
33 | <a href="{% url polls.views.poll_index %}">Poll Index</a> 34 | <a href="{% url 'polls.views.poll_index' %}">Poll Index</a>
34 </p> 35 </p>
35 36
36 {% get_comment_count for poll as comment_count %} 37 {% get_comment_count for poll as comment_count %}
37 <p>This poll has <span id="comment-count">{{ comment_count }}</span> comment{{ comment_count|pluralize }}.</p> 38 <p>This poll has <span id="comment-count">{{ comment_count }}</span> comment{{ comment_count|pluralize }}.</p>
38 <hr /> 39 <hr />
40 {% if poll.is_open %} 41 {% if poll.is_open %}
41 <p>Leave a comment?</p> 42 <p>Leave a comment?</p>
42 {% render_comment_form for poll %} 43 {% render_comment_form for poll %}
43 {% else %} 44 {% else %}
44 <p>Comments are closed for this poll. If you'd like to share your thoughts on this poll 45 <p>Comments are closed for this poll. If you'd like to share your thoughts on this poll
45 with the site staff, you can <a href="{% url contact-form %}">contact us directly</a>.</p> 46 with the site staff, you can <a href="{% url 'contact-form' %}">contact us directly</a>.</p>
46 {% endif %} 47 {% endif %}
47 {% endblock %} 48 {% endblock %}