annotate gpp/templates/polls/poll_results.html @ 143:1ed461fd2030

Podcast enhancements for #39. Provide channel level keyword support. Provide an alternate download URL so we can support both m4a and mp3 formats.
author Brian Neal <bgneal@gmail.com>
date Sun, 06 Dec 2009 21:28:31 +0000
parents 2d299909e074
children daa2916f5b34
rev   line source
gremmie@1 1 {% extends 'base.html' %}
gremmie@1 2 {% load comment_tags %}
bgneal@6 3 {% load script_tags %}
gremmie@1 4 {% block title %}Poll Results: {{ poll.question }}{% endblock %}
gremmie@1 5 {% block custom_css %}
gremmie@1 6 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/polls.css" />
gremmie@1 7 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/comments.css" />
gremmie@1 8 {% endblock %}
gremmie@1 9 {% block custom_js %}
bgneal@6 10 {% if poll.is_open %}
bgneal@127 11 {% script_tags "markitup jquery-ui" %}
gremmie@1 12 <script type="text/javascript" src="{{ MEDIA_URL }}js/comments.js"></script>
bgneal@6 13 {% endif %}
gremmie@1 14 {% endblock %}
gremmie@1 15 {% block content %}
gremmie@1 16 <h2>Polls</h2>
gremmie@1 17 <h3>{{ poll.question }}</h3>
gremmie@1 18 <dl class="poll-result">
gremmie@1 19 {% for choice in choices %}
gremmie@1 20 <dt>{{ choice.choice }} - {{ choice.pct|floatformat }}% ({{ choice.votes }} vote{{ choice.votes|pluralize }})</dt>
gremmie@1 21 <dd>
gremmie@1 22 <div class="poll-percent" style="width: {{ choice.pct|floatformat:0 }}%; background-color: teal; color: white;">
gremmie@1 23 <span>&nbsp;</span></div>
gremmie@1 24 </dd>
gremmie@1 25 {% endfor %}
gremmie@1 26 </dl>
gremmie@1 27 <p><strong>{{ total_votes }} total vote{{ total_votes|pluralize }}.</strong></p>
gremmie@1 28 <p class="poll-nav">
gremmie@1 29 <a href="{{ poll.get_absolute_url }}">Poll Details</a>
gremmie@1 30 {% if poll.is_open and user.is_authenticated %}
gremmie@1 31 | <a href="{% url polls.views.poll_vote poll_id=poll.id %}">Vote</a>
gremmie@1 32 {% endif %}
gremmie@1 33 | <a href="{% url polls.views.poll_index %}">Poll Index</a>
gremmie@1 34 </p>
gremmie@1 35
gremmie@1 36 {% get_comment_count for poll as comment_count %}
gremmie@1 37 <p>This poll has <span id="comment-count">{{ comment_count }}</span> comment{{ comment_count|pluralize }}.</p>
gremmie@1 38 <hr />
gremmie@1 39 {% render_comment_list poll %}
gremmie@1 40 {% if poll.is_open %}
gremmie@1 41 <p>Leave a comment?</p>
gremmie@1 42 {% render_comment_form for poll %}
gremmie@1 43 {% else %}
gremmie@1 44 <p>Comments are closed for this poll. If you'd like to share your thoughts on this poll
gremmie@1 45 with the site staff, you can <a href="{% url contact-form %}">contact us directly</a>.</p>
gremmie@1 46 {% endif %}
gremmie@1 47 {% endblock %}