annotate gpp/templates/contests/contest_detail.html @ 580:c525f3e0b5d0

Use the static() function to serve MEDIA files in development.
author Brian Neal <bgneal@gmail.com>
date Sat, 05 May 2012 15:08:07 -0500
parents 0a8e6a9ccf53
children
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@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@567 36 {% if contest.can_enter %}
bgneal@540 37 <h4>Contest Entry</h4>
bgneal@540 38 <p id="contest-entry">
bgneal@567 39 {% if user.is_authenticated %}
bgneal@540 40 {% if user in contest.contestants.all %}
bgneal@540 41 You are currently entered into this contest.<br />
bgneal@540 42 <button id="contest-button">Withdraw from this contest</button>
bgneal@540 43 {% else %}
bgneal@540 44 You are not participating in this contest.<br />
bgneal@540 45 <button id="contest-button">Please enter me into this contest!</button>
bgneal@540 46 {% endif %}
bgneal@540 47 {% else %}
bgneal@567 48 Please <a href="{% url 'accounts-login' %}?next={{ contest.get_absolute_url }}">login</a>
bgneal@567 49 to enter this contest.
bgneal@540 50 {% endif %}
bgneal@540 51 </p>
bgneal@567 52 {% endif %}
bgneal@540 53
bgneal@540 54 <h4>Contest Winner</h4>
bgneal@540 55 <p>
bgneal@540 56 {% if contest.winner %}
bgneal@540 57 The winner of this contest, selected on {{ contest.win_date|date:"l, F d, Y" }}, is
bgneal@567 58 {% profile_link contest.winner.username '.' %} Congratulations to <strong>{{ contest.winner.username }}</strong>!
bgneal@540 59 {% else %}
bgneal@540 60 A contest winner will be determined sometime on or after {{ contest.end_date|date:"l, F d, Y" }}.
bgneal@540 61 Please check back later.
bgneal@540 62 {% endif %}
bgneal@540 63 </p>
bgneal@540 64 <hr />
bgneal@540 65 {% social_sharing contest.title contest.get_absolute_url %}
bgneal@540 66 {% endblock %}
bgneal@540 67 {% block end_body %}{% include 'core/social_sharing_end.html' %}{% endblock %}