Mercurial > public > sg101
annotate gpp/templates/core/birthday_block.html @ 492:3c48a555298d
Added a custom tag to display a link to a profile. Refactored the avatar tag to optionally display a profile link around the image. Removed the width and height attributes from the avatar image tag. I think this was causing disk hits whenever those properties were not cached. The avatar tag is now an inclusion tag.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 22 Oct 2011 00:07:50 +0000 |
parents | a0847158cf72 |
children | 98f5facc0030 |
rev | line source |
---|---|
bgneal@421 | 1 {% extends 'side_block.html' %} |
bgneal@421 | 2 {% load url from future %} |
bgneal@492 | 3 {% load bio_tags %} |
bgneal@421 | 4 {% load humanize %} |
bgneal@422 | 5 {% 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 | 6 {% block block_content %} |
bgneal@444 | 7 {% if birthdays %} |
bgneal@421 | 8 <ul> |
bgneal@444 | 9 {% for bday in birthdays %} |
bgneal@444 | 10 <li> |
bgneal@444 | 11 {% if bday.day == today.day %}<strong>{% endif %} |
bgneal@444 | 12 {{ bday.day|ordinal }} – |
bgneal@444 | 13 {% for profile in bday.profiles %} |
bgneal@492 | 14 {% profile_link profile.user.username %}{% if not forloop.last %}, {% endif %} |
bgneal@444 | 15 {% endfor %} |
bgneal@444 | 16 {% if bday.day == today.day %}</strong>{% endif %} |
bgneal@444 | 17 </li> |
bgneal@421 | 18 {% endfor %} |
bgneal@421 | 19 </ul> |
bgneal@421 | 20 {% else %} |
bgneal@421 | 21 <p>No birthdays this month.</p> |
bgneal@421 | 22 {% endif %} |
bgneal@421 | 23 {% endblock %} |