comparison gpp/templates/forums/post_ip.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 daa2916f5b34
children
comparison
equal deleted inserted replaced
491:7dbdbb08e68c 492:3c48a555298d
1 {% extends 'base.html' %} 1 {% extends 'base.html' %}
2 {% load url from future %} 2 {% load url from future %}
3 {% load bio_tags %}
3 {% block title %}Post IP Address Info: {{ post.user_ip }}{% endblock %} 4 {% block title %}Post IP Address Info: {{ post.user_ip }}{% endblock %}
4 {% block content %} 5 {% block content %}
5 <h2>Post IP Address Info: {{ post.user_ip }}</h2> 6 <h2>Post IP Address Info: {{ post.user_ip }}</h2>
6 <p> 7 <p>
7 This <a href="{{ post.get_absolute_url }}">post</a> was created by 8 This <a href="{{ post.get_absolute_url }}">post</a> was created by
8 <a href="{% url 'bio-view_profile' username=post.user.username %}">{{ post.user.username }}</a> from the IP address 9 {% profile_link post.user.username %} from the IP address
9 <a href="http://www.dnsstuff.com/tools/whois/?ip={{ post.user_ip }}">{{ post.user_ip }}</a>. 10 <a href="http://www.dnsstuff.com/tools/whois/?ip={{ post.user_ip }}">{{ post.user_ip }}</a>.
10 </p> 11 </p>
11 {% if ip_users %} 12 {% if ip_users %}
12 <p>All users who have posted from {{ post.user_ip }}:</p> 13 <p>All users who have posted from {{ post.user_ip }}:</p>
13 <ul> 14 <ul>
14 {% for user in ip_users %} 15 {% for user in ip_users %}
15 <li><a href="{% url 'bio-view_profile' username=user %}">{{ user }}</a> 16 <li>{% profile_link user %} (<a href="{% url 'forums-posts_for_user' username=user %}">posts</a>)</li>
16 (<a href="{% url 'forums-posts_for_user' username=user %}">posts</a>)</li>
17 {% endfor %} 17 {% endfor %}
18 </ul> 18 </ul>
19 {% endif %} 19 {% endif %}
20 {% endblock %} 20 {% endblock %}