annotate 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
rev   line source
bgneal@421 1 {% extends 'side_block.html' %}
bgneal@421 2 {% load url from future %}
bgneal@421 3 {% load humanize %}
bgneal@422 4 {% 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 %}
bgneal@421 5 {% block block_content %}
bgneal@444 6 {% if birthdays %}
bgneal@421 7 <ul>
bgneal@444 8 {% for bday in birthdays %}
bgneal@444 9 <li>
bgneal@444 10 {% if bday.day == today.day %}<strong>{% endif %}
bgneal@444 11 {{ bday.day|ordinal }} &ndash;
bgneal@444 12 {% for profile in bday.profiles %}
bgneal@444 13 <a href="{% url 'bio-view_profile' username=profile.user.username %}">{{ profile.user.username }}</a>{% if not forloop.last %}, {% endif %}
bgneal@444 14 {% endfor %}
bgneal@444 15 {% if bday.day == today.day %}</strong>{% endif %}
bgneal@444 16 </li>
bgneal@421 17 {% endfor %}
bgneal@421 18 </ul>
bgneal@421 19 {% else %}
bgneal@421 20 <p>No birthdays this month.</p>
bgneal@421 21 {% endif %}
bgneal@421 22 {% endblock %}