Mercurial > public > sg101
comparison gpp/templates/polls/poll_results.html @ 1:dbd703f7d63a
Initial import of sg101 stuff from private repository.
author | gremmie |
---|---|
date | Mon, 06 Apr 2009 02:43:12 +0000 |
parents | |
children | b6263ac72052 |
comparison
equal
deleted
inserted
replaced
0:900ba3c7b765 | 1:dbd703f7d63a |
---|---|
1 {% extends 'base.html' %} | |
2 {% load comment_tags %} | |
3 {% block title %}Poll Results: {{ poll.question }}{% endblock %} | |
4 {% block custom_css %} | |
5 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/polls.css" /> | |
6 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/comments.css" /> | |
7 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}js/markitup/skins/markitup/style.css" /> | |
8 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}js/markitup/sets/markdown/style.css" /> | |
9 {% endblock %} | |
10 {% block custom_js %} | |
11 <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery-1.2.6.min.js"></script> | |
12 <script type="text/javascript" src="{{ MEDIA_URL }}js/comments.js"></script> | |
13 <script type="text/javascript" src="{{ MEDIA_URL }}js/markitup/jquery.markitup.pack.js"></script> | |
14 <script type="text/javascript" src="{{ MEDIA_URL }}js/markitup/sets/markdown/set.js"></script> | |
15 {% endblock %} | |
16 {% block content %} | |
17 <h2>Polls</h2> | |
18 <h3>{{ poll.question }}</h3> | |
19 <dl class="poll-result"> | |
20 {% for choice in choices %} | |
21 <dt>{{ choice.choice }} - {{ choice.pct|floatformat }}% ({{ choice.votes }} vote{{ choice.votes|pluralize }})</dt> | |
22 <dd> | |
23 <div class="poll-percent" style="width: {{ choice.pct|floatformat:0 }}%; background-color: teal; color: white;"> | |
24 <span> </span></div> | |
25 </dd> | |
26 {% endfor %} | |
27 </dl> | |
28 <p><strong>{{ total_votes }} total vote{{ total_votes|pluralize }}.</strong></p> | |
29 <p class="poll-nav"> | |
30 <a href="{{ poll.get_absolute_url }}">Poll Details</a> | |
31 {% if poll.is_open and user.is_authenticated %} | |
32 | <a href="{% url polls.views.poll_vote poll_id=poll.id %}">Vote</a> | |
33 {% endif %} | |
34 | <a href="{% url polls.views.poll_index %}">Poll Index</a> | |
35 </p> | |
36 | |
37 {% get_comment_count for poll as comment_count %} | |
38 <p>This poll has <span id="comment-count">{{ comment_count }}</span> comment{{ comment_count|pluralize }}.</p> | |
39 <hr /> | |
40 {% render_comment_list poll %} | |
41 {% if poll.is_open %} | |
42 <p>Leave a comment?</p> | |
43 {% render_comment_form for poll %} | |
44 {% else %} | |
45 <p>Comments are closed for this poll. If you'd like to share your thoughts on this poll | |
46 with the site staff, you can <a href="{% url contact-form %}">contact us directly</a>.</p> | |
47 {% endif %} | |
48 {% endblock %} |