Mercurial > public > sg101
comparison gpp/templates/contests/contest_detail.html @ 567:0a8e6a9ccf53
Tweaks to the contests application: show the winners on the list page.
Minor presentation changes on the detail template.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 07 Mar 2012 18:12:02 -0600 |
parents | 8f3b7f0d4d13 |
children |
comparison
equal
deleted
inserted
replaced
566:4b9970ad0edb | 567:0a8e6a9ccf53 |
---|---|
31 This contest ran from {{ contest.creation_date|date:"F d, Y" }} to | 31 This contest ran from {{ contest.creation_date|date:"F d, Y" }} to |
32 {{ contest.end_date|date:"F d, Y" }}. | 32 {{ contest.end_date|date:"F d, Y" }}. |
33 {% endif %} | 33 {% endif %} |
34 </p> | 34 </p> |
35 | 35 |
36 {% if contest.can_enter %} | |
36 <h4>Contest Entry</h4> | 37 <h4>Contest Entry</h4> |
37 <p id="contest-entry"> | 38 <p id="contest-entry"> |
38 {% if contest.can_enter and user.is_authenticated %} | 39 {% if user.is_authenticated %} |
39 {% if user in contest.contestants.all %} | 40 {% if user in contest.contestants.all %} |
40 You are currently entered into this contest.<br /> | 41 You are currently entered into this contest.<br /> |
41 <button id="contest-button">Withdraw from this contest</button> | 42 <button id="contest-button">Withdraw from this contest</button> |
42 {% else %} | 43 {% else %} |
43 You are not participating in this contest.<br /> | 44 You are not participating in this contest.<br /> |
44 <button id="contest-button">Please enter me into this contest!</button> | 45 <button id="contest-button">Please enter me into this contest!</button> |
45 {% endif %} | 46 {% endif %} |
46 {% else %} | 47 {% else %} |
47 {% if contest.can_enter %} | 48 Please <a href="{% url 'accounts-login' %}?next={{ contest.get_absolute_url }}">login</a> |
48 Please <a href="{% url 'accounts-login' %}?next={{ contest.get_absolute_url }}">login</a> | 49 to enter this contest. |
49 to enter this contest. | |
50 {% else %} | |
51 Sorry, we are no longer accepting entries to this contest. | |
52 {% endif %} | |
53 {% endif %} | 50 {% endif %} |
54 </p> | 51 </p> |
52 {% endif %} | |
55 | 53 |
56 <h4>Contest Winner</h4> | 54 <h4>Contest Winner</h4> |
57 <p> | 55 <p> |
58 {% if contest.winner %} | 56 {% if contest.winner %} |
59 The winner of this contest, selected on {{ contest.win_date|date:"l, F d, Y" }}, is | 57 The winner of this contest, selected on {{ contest.win_date|date:"l, F d, Y" }}, is |
60 {% profile_link contest.winner.username %}. Congratulations to <strong>{{ contest.winner.username }}</strong>! | 58 {% profile_link contest.winner.username '.' %} Congratulations to <strong>{{ contest.winner.username }}</strong>! |
61 {% else %} | 59 {% else %} |
62 A contest winner will be determined sometime on or after {{ contest.end_date|date:"l, F d, Y" }}. | 60 A contest winner will be determined sometime on or after {{ contest.end_date|date:"l, F d, Y" }}. |
63 Please check back later. | 61 Please check back later. |
64 {% endif %} | 62 {% endif %} |
65 </p> | 63 </p> |