annotate gpp/templates/core/birthday_block.html @ 467:b910cc1460c8

Add the ability to conditionally add model instances to the search index on update. This is not perfect, as some instances should be deleted from the index if they are updated such that they should not be in the index anymore. Will think about and address that later.
author Brian Neal <bgneal@gmail.com>
date Sun, 24 Jul 2011 18:12:20 +0000
parents a0847158cf72
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 %}