1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{% load i18n %}
{% load highlight %}
<li class="preview-message">
<span class="glyphicon glyphicon-{{ result.icon_name }}" title="{{ result.type }}"></span>
{% if result.tag %}
<a href="{% firstof result.mailinglist_url result.mailinglist.get_absolute_url result.url %}">
<span class="label label-primary">{{ result.tag }}</span>
</a>
{% endif %}
{% if result.title %}
<a href="{{ result.url }}" {% if result.description %}title="{{ result.description|escape|truncatechars:200 }}"{% endif %}>
<span class="subject">
<!-- a striptags filter was raising an error here because using with highlight -->
{% if query %}
{% highlight result.title with query max_length "1000" %}
{% else %}
{{ result.title }}
{% endif %}
</span>
</a>
{% endif %}
{% if result.description %}
<!-- a striptags filter was raising an error here because using with highlight -->
<span class="quiet">- {% if query %}{% highlight result.description with query max_length "150" %}{% else %}{{ result.description }}{% endif %}</span>
{% endif %}
{% if result.author or result.modified %}
<div class="quiet">
{% if result.author %}
<span class="pull-left">{% trans "by" %}
{% if result.author and result.author_url %}
<a href="{{ result.author_url }}">
{% if query %}
{% highlight result.author with query %}
{% else %}
{{ result.author }}
{% endif %}
</a>
{% else %}
<span>{{ result.author }}</span>
{% endif %}
</span>
{% endif %}
{% if result.modified %}
<span class="pull-right">{{ result.modified|timesince }} {% trans "ago" %}</span>
{% endif %}
</div>
{% endif %}
</li>