{% load markdown %}

{% if message %}
<html>
<head>
<style>
body {
  font-family: Verdana, sans-serif;
  font-size: 0.8em;
  color:#484848;
}
h1, h2, h3 { font-family: "Trebuchet MS", Verdana, sans-serif; margin: 0p=
x; }
h1 { font-size: 1.2em; }
h2, h3 { font-size: 1.1em; }
a, a:link, a:visited { color: #2A5685;}
a:hover, a:active { color: #c61a1a; }
a.wiki-anchor { display: none; }
hr {
  width: 100%;
  height: 1px;
  background: #ccc;
  border: 0;
}
.footer {
  font-size: 0.8em;
  font-style: italic;
}
</style>
</head>
<body>
{% if not ticket_message %}
Issue #{{ ticket.id }} has been reported by {{ ticket.created_by }}.
{% else %}
Issue #{{ ticket.id }} has been updated by {{ ticket_message.author }}.
{% autoescape off %}
{{ ticket_message.content|markdown }}
{% endautoescape %}
{% endif %}
<hr />
<h1><a href="http://{{ site.domain }}{% url 'admin:issues_ticket_change' ticket.id %}">Issue #{{ ticket.pk }}: {{ ticket.subject }}</a></h1>

<ul>
<li>Author: {{ ticket.created_by }}</li>
<li>Status: {{ ticket.get_state_display }}</li>
<li>Priority: {{ ticket.get_priority_display }}</li>
<li>Visibility: {{ ticket.get_visibility_display }}</li>
<li>Group: {% if ticket.group %}{{ ticket.group }}{% endif %}</li>
<li>Assigned to: {% if ticket.owner %}{{ ticket.owner }}{% endif %}</li>
<li>Queue: {{ ticket.queue }}</li>
</ul>
{% autoescape off %}
{{ ticket.description|markdown }}
{% endautoescape %}
<hr />
<span class="footer"><p>You have received this notification because you have either subscribed to it, or are involved in it.<br />
To change your notification preferences, please click here: <a class="external" href="{{ site.scheme }}://{{ site.domain }}{% url 'admin:issues_ticket_change' ticket.id %}">{{ site.scheme }}://{{ site.domain }}{% url 'admin:issues_ticket_change' ticket.id %}</a></p></span>
</body>
</html>
{% endif %}
