message-preview.html 1.28 KB
{% load i18n %}

{% if doc.Title %}
<li class="preview-message">
  {% if doc.Type %}
  <img alt="{{ doc.Type }}" title="{{ doc.Type }}" 
       src="{{ STATIC_URL }}img/{{ doc.Type }}.png" />
  {% else %}
  <img alt="thread" title="thread" 
       src="{{ STATIC_URL }}img/thread.png" />
  {% endif %}
  
  {% if doc.mailinglist %}
  <a href="{% url 'super_archives.views.list_messages' %}?list={{ doc.mailinglist }}">
    <span class="tag">{{ doc.mailinglist }}</span>
  </a>
  {% endif %}

  <span class="subject">
    <a href="{{ doc.url }}"
       {% if 
       title="{% filter striptags|truncatewords:50 %}
                {{ doc.Description|escape }}
              {% endfilter %}">
      {{ doc.Title }}
    </a>
  </span>
  
  <span class="quiet">- 
    {{ doc.Description|striptags }}
  </span>
  
  <div class="quiet">
    <span class="left">
      {% trans "by" %}
																												      {% if doc.from_address.get_full_name %}
      <a href="{{ doc.from_address.get_profile_link }}">
        {{ doc.from_address.get_full_name }}
      </a>
      {% else %}
        {% firstof doc.last_author doc.Creator _("anonymous") %}
      {% endif %}
    </span>    
          
    <span class="right">
      {{ doc.modified|timesince }}
      {% trans "ago" %} 
    </span>
  </div>
</li>
{% endif %}