Mercurial > public > sg101
comparison gpp/templates/contests/contest_detail.html @ 540:51fa1e0ca218
For #243, create a contests application.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Mon, 09 Jan 2012 01:13:08 +0000 |
parents | |
children | 8f3b7f0d4d13 |
comparison
equal
deleted
inserted
replaced
539:2f0a372c92b4 | 540:51fa1e0ca218 |
---|---|
1 {% extends 'base.html' %} | |
2 {% load url from future %} | |
3 {% load bio_tags %} | |
4 {% load core_tags %} | |
5 {% block custom_meta %} | |
6 {% open_graph_meta_tags contest %} | |
7 {% endblock %} | |
8 {% block title %}Contests: {{ contest.title }}{% endblock %} | |
9 {% block custom_js %} | |
10 <script type="text/javascript"> | |
11 var contest_id = {{ contest.id }}; | |
12 </script> | |
13 <script type="text/javascript" src="{{ STATIC_URL }}js/contests/contests.js"></script> | |
14 {% endblock %} | |
15 | |
16 {% block begin_body %}{% include 'core/social_sharing_begin.html' %}{% endblock %} | |
17 {% block content %} | |
18 <h2><a href="{% url 'contests-index' %}">Contests</a></h2> | |
19 <h3><a href="{% url 'contests-contest' slug=contest.slug %}">{{ contest.title }}</a></h3> | |
20 <div> | |
21 {{ contest.description|safe }} | |
22 </div> | |
23 | |
24 <h4>Contest Dates</h4> | |
25 <p> | |
26 {% if contest.is_active %} | |
27 This contest began on {{ contest.creation_date|date:"F d, Y" }} and ends on | |
28 {{ contest.end_date|date:"F d, Y" }}. | |
29 {% else %} | |
30 This contest ran from {{ contest.creation_date|date:"F d, Y" }} to | |
31 {{ contest.end_date|date:"F d, Y" }}. | |
32 {% endif %} | |
33 </p> | |
34 | |
35 <h4>Contest Entry</h4> | |
36 <p id="contest-entry"> | |
37 {% if contest.can_enter and user.is_authenticated %} | |
38 {% if user in contest.contestants.all %} | |
39 You are currently entered into this contest.<br /> | |
40 <button id="contest-button">Withdraw from this contest</button> | |
41 {% else %} | |
42 You are not participating in this contest.<br /> | |
43 <button id="contest-button">Please enter me into this contest!</button> | |
44 {% endif %} | |
45 {% else %} | |
46 {% if contest.can_enter %} | |
47 Please <a href="{% url 'accounts-login' %}?next={{ contest.get_absolute_url }}">login</a> | |
48 to enter this contest. | |
49 {% else %} | |
50 Sorry, we are no longer accepting entries to this contest. | |
51 {% endif %} | |
52 {% endif %} | |
53 </p> | |
54 | |
55 <h4>Contest Winner</h4> | |
56 <p> | |
57 {% if contest.winner %} | |
58 The winner of this contest, selected on {{ contest.win_date|date:"l, F d, Y" }}, is | |
59 {% profile_link contest.winner.username %}. Congratulations to <strong>{{ contest.winner.username }}</strong>! | |
60 {% else %} | |
61 A contest winner will be determined sometime on or after {{ contest.end_date|date:"l, F d, Y" }}. | |
62 Please check back later. | |
63 {% endif %} | |
64 </p> | |
65 <hr /> | |
66 {% social_sharing contest.title contest.get_absolute_url %} | |
67 {% endblock %} | |
68 {% block end_body %}{% include 'core/social_sharing_end.html' %}{% endblock %} |