view sg101/templates/forums/display_post.html @ 1018:02ae9a4a846a

ManifestStaticFilesStorage: get rid of STATIC_URL in templates.
author Brian Neal <bgneal@gmail.com>
date Sun, 06 Dec 2015 21:49:39 -0600
parents ab3deff7672a
children 7e0c3cbd3cda
line wrap: on
line source
{% load static from staticfiles %}
{% load bio_tags %}
{% load forum_tags %}
{% load messages_tags %}
<tr class="forum-post {{ rowcolors }}" id="post-{{ post.id }}">
   <td class="forum-post-author">
      <a name="p{{ post.id }}"></a>
      <span class="post-author">{% profile_link post.user.username %}</span><br />
      {% avatar post.user %}<br />
      Joined: {{ post.user.date_joined|date:"M d, Y" }}<br />
      Posts: {{ post.user.profile.forum_post_count }}<br />
      {% if post.user.profile.location %}
         {{ post.user.profile.location }}<br />
      {% endif %}
      {% if post.user.profile.country %}
         {% flag_icon post.user.profile.country 'small' %}<br />
      {% endif %}
      {% for bo in post.user.profile.badge_ownership %}
         <img src="{{ bo.badge.image.url }}" alt="{{ bo.badge_count_str }}" title="{{ bo.badge_count_str }}" />
      {% endfor %}
      {% if user.is_authenticated %}
      <p>
      <a href="{% send_pm_url post.user.username %}">
         <img src="{% static "icons/note.png" %}" alt="PM" title="Send Private Message to {{ post.user.username }}" /></a>
      {% if not post.user.profile.hide_email %}<a href="mailto:{{ post.user.email }}">
         <img src="{% static "icons/email.png" %}" alt="Email" title="Send Email to {{ post.user.username}}" /></a>{% endif %}
      </p>
      {% endif %}
   </td>
   <td class="forum-post-body">
      <div class="forum-post-info quiet{% if post.user.profile.is_stranger %} stranger{% endif %}">
      {% if post.unread %}<img src="{% static "icons/new.png" %}" alt="New" title="New" />{% endif %}
      <a href="{{ post.get_absolute_url }}"><img src="{% static "icons/link.png" %}" alt="Link" title="Link to this post" /></a>
         Posted on {% forum_date post.creation_date user %}
         {% if can_moderate %}from IP: <a href="{% url 'forums-post_ip_info' post.id %}">{{ post.user_ip }}</a>{% endif %}
      </div>
      <div class="forum-post-body">
         {{ post.html|safe }}
         {% if post.user.profile.signature_html %}
            &mdash;{{ post.user.profile.signature_html|safe }}
         {% endif %}
         {% if post.has_been_edited %}
         <p class="small quiet">Last edited: {{ post.update_date|date:"M d, Y H:i:s" }}</p>
         {% endif %}
      </div>
      {% if post.attachments.all %}
      <div>
         {% for item in post.attachments.all %}
         <div class="forum-attachment">{{ item.html|safe }}</div>
         {% endfor %}
      </div>
      {% endif %}
      <div class="forum-post-info-tools">
      <a href="#top" class="quiet" title="Goto the top of the page">Top</a>
      {% if can_reply %}
         <a href="{% url 'forums-new_post' topic_id=post.topic.id %}?quote={{ post.id }}"><img src="{% static "icons/comment.png" %}" alt="Reply with quote" title="Reply with quote" /></a>
      {% endif %}
      {% post_edit_button post user can_moderate %}
      <a href="#" class="post-flag" id="fp-{{ post.id }}" 
         title="Flag this post as spam, abuse, or a violation of site rules.">
         <img src="{% static "icons/flag_red.png" %}" alt="Flag" /></a>
      {% if can_moderate %}
      <a href="#" class="post-delete" id="dp-{{ post.id }}"
         title="Delete this post"><img src="{% static "icons/cross.png" %}" alt="Delete post" /></a>
         {% if post.user != user and post.user.profile.is_stranger %}
         <br />
         <span class="quiet">Stranger options:</span>
         <a href="{% url 'forums-stranger' post.id %}" title="This stranger seems legitimate">
            <img src="{% static "icons/tick.png" %}" alt="Acquaintance" /></a>
         <a href="{% url 'forums-spammer' post.id %}" title="This is spam">
            <img src="{% static "icons/exclamation.png" %}" alt="Spammer" /></a>
         {% endif %}
      {% endif %}
      </div>
   </td>
</tr>