comparison gpp/templates/comments/comment.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 88b2b9cb8c1f
children
comparison
equal deleted inserted replaced
491:7dbdbb08e68c 492:3c48a555298d
1 {% load url from future %} 1 {% load url from future %}
2 {% load avatar_tags %} 2 {% load bio_tags %}
3 <div class="comment" id="c{{ comment.id }}"> 3 <div class="comment" id="c{{ comment.id }}">
4 <div class="comment-list">{{ forloop.counter }}.</div> 4 <div class="comment-list">{{ forloop.counter }}.</div>
5 <div class="comment-avatar"> 5 <div class="comment-avatar">
6 <a href="{% url 'bio-view_profile' username=comment.user.username%}">{% avatar comment.user %}</a> 6 {% avatar comment.user %}
7 </div> 7 </div>
8 {% if comment.is_removed %} 8 {% if comment.is_removed %}
9 <div class="comment-text-removed"><p><em>This comment has been removed.</em></p></div> 9 <div class="comment-text-removed"><p><em>This comment has been removed.</em></p></div>
10 {% else %} 10 {% else %}
11 <div class="comment-text">{{ comment.html|safe }}</div> 11 <div class="comment-text">{{ comment.html|safe }}</div>
12 {% endif %} 12 {% endif %}
13 <div class="comment-details"> 13 <div class="comment-details">
14 <a href="{% url 'bio-view_profile' username=comment.user.username%}" 14 {% profile_link comment.user.username %} |
15 title="View profile for {{ comment.user.username }}">{{ comment.user.username }}</a> |
16 {{ comment.creation_date|date:"d-M-Y H:i:s" }} 15 {{ comment.creation_date|date:"d-M-Y H:i:s" }}
17 {% if not comment.is_removed %} 16 {% if not comment.is_removed %}
18 | <a href="#" class="comment-flag" id="fc-{{ comment.id }}" 17 | <a href="#" class="comment-flag" id="fc-{{ comment.id }}"
19 title="Flag this comment as spam, abuse, or a violation of site rules."> 18 title="Flag this comment as spam, abuse, or a violation of site rules.">
20 <img src="{{ STATIC_URL }}icons/flag_red.png" alt="Flag" /></a> 19 <img src="{{ STATIC_URL }}icons/flag_red.png" alt="Flag" /></a>