annotate gpp/templates/contests/contest_detail.html @ 557:7247a406f92b

Merging change to requirements.txt made on production server.
author Brian Neal <bgneal@gmail.com>
date Sun, 29 Jan 2012 14:45:09 -0600
parents 51fa1e0ca218
children 8f3b7f0d4d13
rev   line source
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@540 22 </div>
bgneal@540 23
bgneal@540 24 <h4>Contest Dates</h4>
bgneal@540 25 <p>
bgneal@540 26 {% if contest.is_active %}
bgneal@540 27 This contest began on {{ contest.creation_date|date:"F d, Y" }} and ends on
bgneal@540 28 {{ contest.end_date|date:"F d, Y" }}.
bgneal@540 29 {% else %}
bgneal@540 30 This contest ran from {{ contest.creation_date|date:"F d, Y" }} to
bgneal@540 31 {{ contest.end_date|date:"F d, Y" }}.
bgneal@540 32 {% endif %}
bgneal@540 33 </p>
bgneal@540 34
bgneal@540 35 <h4>Contest Entry</h4>
bgneal@540 36 <p id="contest-entry">
bgneal@540 37 {% if contest.can_enter and user.is_authenticated %}
bgneal@540 38 {% if user in contest.contestants.all %}
bgneal@540 39 You are currently entered into this contest.<br />
bgneal@540 40 <button id="contest-button">Withdraw from this contest</button>
bgneal@540 41 {% else %}
bgneal@540 42 You are not participating in this contest.<br />
bgneal@540 43 <button id="contest-button">Please enter me into this contest!</button>
bgneal@540 44 {% endif %}
bgneal@540 45 {% else %}
bgneal@540 46 {% if contest.can_enter %}
bgneal@540 47 Please <a href="{% url 'accounts-login' %}?next={{ contest.get_absolute_url }}">login</a>
bgneal@540 48 to enter this contest.
bgneal@540 49 {% else %}
bgneal@540 50 Sorry, we are no longer accepting entries to this contest.
bgneal@540 51 {% endif %}
bgneal@540 52 {% endif %}
bgneal@540 53 </p>
bgneal@540 54
bgneal@540 55 <h4>Contest Winner</h4>
bgneal@540 56 <p>
bgneal@540 57 {% if contest.winner %}
bgneal@540 58 The winner of this contest, selected on {{ contest.win_date|date:"l, F d, Y" }}, is
bgneal@540 59 {% profile_link contest.winner.username %}. Congratulations to <strong>{{ contest.winner.username }}</strong>!
bgneal@540 60 {% else %}
bgneal@540 61 A contest winner will be determined sometime on or after {{ contest.end_date|date:"l, F d, Y" }}.
bgneal@540 62 Please check back later.
bgneal@540 63 {% endif %}
bgneal@540 64 </p>
bgneal@540 65 <hr />
bgneal@540 66 {% social_sharing contest.title contest.get_absolute_url %}
bgneal@540 67 {% endblock %}
bgneal@540 68 {% block end_body %}{% include 'core/social_sharing_end.html' %}{% endblock %}