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