comparison gpp/templates/forums/display_post.html @ 310:daa2916f5b34

Fixing 145; New url tag behavior (forwards compatibility) in Django 1.3.
author Brian Neal <bgneal@gmail.com>
date Thu, 20 Jan 2011 04:03:48 +0000
parents 8fd4984d5c3b
children 88b2b9cb8c1f
comparison
equal deleted inserted replaced
309:8a0bae48b6ca 310:daa2916f5b34
1 {% load url from future %}
1 {% load avatar_tags %} 2 {% load avatar_tags %}
2 {% load forum_tags %} 3 {% load forum_tags %}
3 <tr class="forum-post {% cycle 'odd' 'even' %}" id="post-{{ post.id }}"> 4 <tr class="forum-post {% cycle 'odd' 'even' %}" id="post-{{ post.id }}">
4 <td class="forum-post-author"> 5 <td class="forum-post-author">
5 <a name="p{{ post.id }}"></a> 6 <a name="p{{ post.id }}"></a>
6 <a href="{% url bio-view_profile username=post.user.username %}" title="View Profile for {{ post.user.username }}">{{ post.user.username }}</a><br /> 7 <a href="{% url 'bio-view_profile' username=post.user.username %}" title="View Profile for {{ post.user.username }}">{{ post.user.username }}</a><br />
7 <a href="{% url bio-view_profile username=post.user.username %}">{% avatar post.user %}</a> 8 <a href="{% url 'bio-view_profile' username=post.user.username %}">{% avatar post.user %}</a>
8 Joined: {{ post.user.date_joined|date:"M d, Y" }}<br /> 9 Joined: {{ post.user.date_joined|date:"M d, Y" }}<br />
9 Posts: {{ post.user_profile.forum_post_count }}<br /> 10 Posts: {{ post.user_profile.forum_post_count }}<br />
10 {% if post.user_profile.location %} 11 {% if post.user_profile.location %}
11 Location: {{ post.user_profile.location }}<br /> 12 Location: {{ post.user_profile.location }}<br />
12 {% endif %} 13 {% endif %}
13 {% for bo in post.user_profile.badge_ownership %} 14 {% for bo in post.user_profile.badge_ownership %}
14 <img src="{{ bo.badge.image.url }}" alt="{{ bo.badge_count_str }}" title="{{ bo.badge_count_str }}" /> 15 <img src="{{ bo.badge.image.url }}" alt="{{ bo.badge_count_str }}" title="{{ bo.badge_count_str }}" />
15 {% endfor %} 16 {% endfor %}
16 {% if user.is_authenticated %} 17 {% if user.is_authenticated %}
17 <p> 18 <p>
18 <a href="{% url messages-compose_to post.user.username %}"> 19 <a href="{% url 'messages-compose_to' post.user.username %}">
19 <img src="{{ MEDIA_URL }}icons/note.png" alt="PM" title="Send Private Message to {{ post.user.username }}" /></a> 20 <img src="{{ MEDIA_URL }}icons/note.png" alt="PM" title="Send Private Message to {{ post.user.username }}" /></a>
20 {% if not post.user_profile.hide_email %}<a href="mailto:{{ post.user.email }}"> 21 {% if not post.user_profile.hide_email %}<a href="mailto:{{ post.user.email }}">
21 <img src="{{ MEDIA_URL }}icons/email.png" alt="Email" title="Send Email to {{ post.user.username}}" /></a>{% endif %} 22 <img src="{{ MEDIA_URL }}icons/email.png" alt="Email" title="Send Email to {{ post.user.username}}" /></a>{% endif %}
22 </p> 23 </p>
23 {% endif %} 24 {% endif %}
25 <td class="forum-post-body"> 26 <td class="forum-post-body">
26 <div class="forum-post-info quiet{% if post.user_profile.is_stranger %} stranger{% endif %}"> 27 <div class="forum-post-info quiet{% if post.user_profile.is_stranger %} stranger{% endif %}">
27 {% if post.unread %}<img src="{{ MEDIA_URL }}icons/new.png" alt="New" title="New" />{% endif %} 28 {% if post.unread %}<img src="{{ MEDIA_URL }}icons/new.png" alt="New" title="New" />{% endif %}
28 <a href="{{ post.get_absolute_url }}"><img src="{{ MEDIA_URL }}icons/link.png" alt="Link" title="Link to this post" /></a> 29 <a href="{{ post.get_absolute_url }}"><img src="{{ MEDIA_URL }}icons/link.png" alt="Link" title="Link to this post" /></a>
29 Posted on {% forum_date post.creation_date user %} 30 Posted on {% forum_date post.creation_date user %}
30 {% if can_moderate %}from IP: <a href="{% url forums-post_ip_info post.id %}">{{ post.user_ip }}</a>{% endif %} 31 {% if can_moderate %}from IP: <a href="{% url 'forums-post_ip_info' post.id %}">{{ post.user_ip }}</a>{% endif %}
31 </div> 32 </div>
32 <div class="forum-post-body"> 33 <div class="forum-post-body">
33 {{ post.html|safe }} 34 {{ post.html|safe }}
34 {% if post.user_profile.signature_html %} 35 {% if post.user_profile.signature_html %}
35 &mdash;{{ post.user_profile.signature_html|safe }} 36 &mdash;{{ post.user_profile.signature_html|safe }}
45 {% endfor %} 46 {% endfor %}
46 </div> 47 </div>
47 {% endif %} 48 {% endif %}
48 <div class="forum-post-info-tools"> 49 <div class="forum-post-info-tools">
49 {% if can_reply %} 50 {% if can_reply %}
50 <a href="{% url forums-new_post topic_id=post.topic.id %}?quote={{ post.id }}"><img src="{{ MEDIA_URL }}icons/comment.png" alt="Reply with quote" title="Reply with quote" /></a> 51 <a href="{% url 'forums-new_post' topic_id=post.topic.id %}?quote={{ post.id }}"><img src="{{ MEDIA_URL }}icons/comment.png" alt="Reply with quote" title="Reply with quote" /></a>
51 {% endif %} 52 {% endif %}
52 {% post_edit_button post user can_moderate MEDIA_URL %} 53 {% post_edit_button post user can_moderate MEDIA_URL %}
53 <a href="#" class="post-flag" id="fp-{{ post.id }}" 54 <a href="#" class="post-flag" id="fp-{{ post.id }}"
54 title="Flag this post as spam, abuse, or a violation of site rules."> 55 title="Flag this post as spam, abuse, or a violation of site rules.">
55 <img src="{{ MEDIA_URL }}icons/flag_red.png" alt="Flag" /></a> 56 <img src="{{ MEDIA_URL }}icons/flag_red.png" alt="Flag" /></a>
57 <a href="#" class="post-delete" id="dp-{{ post.id }}" 58 <a href="#" class="post-delete" id="dp-{{ post.id }}"
58 title="Delete this post"><img src="{{ MEDIA_URL }}icons/cross.png" alt="Delete post" /></a> 59 title="Delete this post"><img src="{{ MEDIA_URL }}icons/cross.png" alt="Delete post" /></a>
59 {% if post.user != user and post.user_profile.is_stranger %} 60 {% if post.user != user and post.user_profile.is_stranger %}
60 <br /> 61 <br />
61 <span class="quiet">Stranger options:</span> 62 <span class="quiet">Stranger options:</span>
62 <a href="{% url forums-stranger post.id %}" title="This stranger seems legitimate"> 63 <a href="{% url 'forums-stranger' post.id %}" title="This stranger seems legitimate">
63 <img src="{{ MEDIA_URL }}icons/tick.png" alt="Acquaintance" /></a> 64 <img src="{{ MEDIA_URL }}icons/tick.png" alt="Acquaintance" /></a>
64 <a href="{% url forums-spammer post.id %}" title="This is spam"> 65 <a href="{% url 'forums-spammer' post.id %}" title="This is spam">
65 <img src="{{ MEDIA_URL }}icons/exclamation.png" alt="Spammer" /></a> 66 <img src="{{ MEDIA_URL }}icons/exclamation.png" alt="Spammer" /></a>
66 {% endif %} 67 {% endif %}
67 {% endif %} 68 {% endif %}
68 </div> 69 </div>
69 </td> 70 </td>