Mercurial > public > sg101
diff 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 |
line wrap: on
line diff
--- a/gpp/templates/contests/contest_list.html Sun Mar 04 14:52:24 2012 -0600 +++ b/gpp/templates/contests/contest_list.html Wed Mar 07 18:12:02 2012 -0600 @@ -1,4 +1,5 @@ {% extends 'base.html' %} +{% load bio_tags %} {% block title %}Contests{% endblock %} {% block content %} <h2>Contests</h2> @@ -9,7 +10,15 @@ {% for contest in contests %} <li><a href="{{ contest.get_absolute_url }}">{{ contest.title }}</a> - {{ contest.creation_date|date:"F d, Y" }} to {{ contest.end_date|date:"F d, Y" }} - {% if contest.is_active %}<img src="{{ STATIC_URL }}icons/new.png" alt="New" />{% else %}<img src="{{ STATIC_URL }}icons/lock.png" alt="Old" />{% endif %} + {% if contest.is_active %} + <img src="{{ STATIC_URL }}icons/new.png" alt="New" /> + {% else %} + {% if contest.winner %} + <img src="{{ STATIC_URL }}icons/rosette.png" alt="Winner" /> {% profile_link contest.winner.username %} + {% else %} + <img src="{{ STATIC_URL }}icons/lock.png" alt="Old" /> + {% endif %} + {% endif %} </li> {% endfor %} </ul>