Mercurial > public > sg101
diff gpp/templates/core/birthday_block.html @ 444:a0847158cf72
Tweaking the birthday block; now display a list of people for each day and bold the current day.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 04 Jun 2011 19:10:34 +0000 |
parents | 6309814cd6f7 |
children | 3c48a555298d |
line wrap: on
line diff
--- a/gpp/templates/core/birthday_block.html Sat Jun 04 03:12:15 2011 +0000 +++ b/gpp/templates/core/birthday_block.html Sat Jun 04 19:10:34 2011 +0000 @@ -3,10 +3,17 @@ {% load humanize %} {% block block_title %}<img src="{{ STATIC_URL }}icons/cake.png" alt="Cake" class="middle" /> {{ today|date:"F" }} Birthdays <img src="{{ STATIC_URL }}icons/cake.png" alt="Cake" class="middle" /> {% endblock %} {% block block_content %} -{% if profiles %} +{% if birthdays %} <ul> - {% for profile in profiles %} - <li>{{ profile.birthday.day|ordinal }} – <a href="{% url 'bio-view_profile' username=profile.user.username %}">{{ profile.user.username }}</a></li> + {% for bday in birthdays %} + <li> + {% if bday.day == today.day %}<strong>{% endif %} + {{ bday.day|ordinal }} – + {% for profile in bday.profiles %} + <a href="{% url 'bio-view_profile' username=profile.user.username %}">{{ profile.user.username }}</a>{% if not forloop.last %}, {% endif %} + {% endfor %} + {% if bday.day == today.day %}</strong>{% endif %} + </li> {% endfor %} </ul> {% else %}