{% extends "base.html" %}
{% load i18n static inkscape %}

{% block "css" %}{{ block.super }}
  <link rel="stylesheet" type="text/css" href="{% static "css/alert.css" %}"/>
{% endblock %}

{% block content %}

  <h1>{% block title %}{% trans "Sent Messages" %}{% endblock %}</h1>

  {% for object in object_list %}
    {% with object.data as data %}

<div class="comment" id="alert_{{ object.id }}">
  <div class="details">
    {% if data.instance_deleted %}
      <div class="title">{{ data.instance_deleted }}</div>
    {% else %}
      <div class="title">
        <a href="{{ data.instance.get_absolute_url }}">{{ object.subject }}</a>
      </div>
    {% endif %}
    <div class="index">{{ object.created|timetag }}</div>
  </div>
  {% if not data.instance_deleted %}
    <div class="body">
      <div class="text">{{ object.body|urlize|linebreaks }}</div>
    </div>
    <div class="footer">
      <div class="status">{% trans "to" %} <a href="{{ object.recipient.get_absolute_url }}" title="{% trans "Visit profile" %}">{{ object.recipient }}</a></div>
    </div>
  {% endif %}
</div>
    {% endwith %}
  {% empty %}
    <h2>{% trans "No sent messages" %}</h2>
  {% endfor %}

{% endblock %}

