comparison 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
comparison
equal deleted inserted replaced
491:7dbdbb08e68c 492:3c48a555298d
1 {% extends 'side_block.html' %} 1 {% extends 'side_block.html' %}
2 {% load url from future %} 2 {% load url from future %}
3 {% load bio_tags %}
3 {% load humanize %} 4 {% load humanize %}
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 %} 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 %}
5 {% block block_content %} 6 {% block block_content %}
6 {% if birthdays %} 7 {% if birthdays %}
7 <ul> 8 <ul>
8 {% for bday in birthdays %} 9 {% for bday in birthdays %}
9 <li> 10 <li>
10 {% if bday.day == today.day %}<strong>{% endif %} 11 {% if bday.day == today.day %}<strong>{% endif %}
11 {{ bday.day|ordinal }} &ndash; 12 {{ bday.day|ordinal }} &ndash;
12 {% for profile in bday.profiles %} 13 {% for profile in bday.profiles %}
13 <a href="{% url 'bio-view_profile' username=profile.user.username %}">{{ profile.user.username }}</a>{% if not forloop.last %}, {% endif %} 14 {% profile_link profile.user.username %}{% if not forloop.last %}, {% endif %}
14 {% endfor %} 15 {% endfor %}
15 {% if bday.day == today.day %}</strong>{% endif %} 16 {% if bday.day == today.day %}</strong>{% endif %}
16 </li> 17 </li>
17 {% endfor %} 18 {% endfor %}
18 </ul> 19 </ul>