Mercurial > public > sg101
comparison gpp/templates/contests/contest_list.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 | 51fa1e0ca218 |
children |
comparison
equal
deleted
inserted
replaced
566:4b9970ad0edb | 567:0a8e6a9ccf53 |
---|---|
1 {% extends 'base.html' %} | 1 {% extends 'base.html' %} |
2 {% load bio_tags %} | |
2 {% block title %}Contests{% endblock %} | 3 {% block title %}Contests{% endblock %} |
3 {% block content %} | 4 {% block content %} |
4 <h2>Contests</h2> | 5 <h2>Contests</h2> |
5 <p>From time to time, SurfGuitar101.com may hold drawings and contests. This page lists | 6 <p>From time to time, SurfGuitar101.com may hold drawings and contests. This page lists |
6 the current and past contests on the site.</p> | 7 the current and past contests on the site.</p> |
7 {% if object_list %} | 8 {% if object_list %} |
8 <ul> | 9 <ul> |
9 {% for contest in contests %} | 10 {% for contest in contests %} |
10 <li><a href="{{ contest.get_absolute_url }}">{{ contest.title }}</a> - | 11 <li><a href="{{ contest.get_absolute_url }}">{{ contest.title }}</a> - |
11 {{ contest.creation_date|date:"F d, Y" }} to {{ contest.end_date|date:"F d, Y" }} | 12 {{ contest.creation_date|date:"F d, Y" }} to {{ contest.end_date|date:"F d, Y" }} |
12 {% if contest.is_active %}<img src="{{ STATIC_URL }}icons/new.png" alt="New" />{% else %}<img src="{{ STATIC_URL }}icons/lock.png" alt="Old" />{% endif %} | 13 {% if contest.is_active %} |
14 <img src="{{ STATIC_URL }}icons/new.png" alt="New" /> | |
15 {% else %} | |
16 {% if contest.winner %} | |
17 <img src="{{ STATIC_URL }}icons/rosette.png" alt="Winner" /> {% profile_link contest.winner.username %} | |
18 {% else %} | |
19 <img src="{{ STATIC_URL }}icons/lock.png" alt="Old" /> | |
20 {% endif %} | |
21 {% endif %} | |
13 </li> | 22 </li> |
14 {% endfor %} | 23 {% endfor %} |
15 </ul> | 24 </ul> |
16 {% else %} | 25 {% else %} |
17 <p>No contests at this time.</p> | 26 <p>No contests at this time.</p> |