-
Notifications
You must be signed in to change notification settings - Fork 1
/
list.html
54 lines (53 loc) · 1.72 KB
/
list.html
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
54
{% load i18n %}
<table class="table table-striped">
<thead>
<tr>
{% if show_user %}
<th>{% trans "User" %}</th>
{% endif %}
<th>{% trans "Title" %}</th>
<th width="100px">{% trans "Price" %}</th>
<th width="50px"><abbr title="{% trans "Priority" %}">{% trans "P" context "Shortcut for priority" %}</abbr></th>
<th width="220px">{% trans "Actions" %}</th>
</tr>
</thead>
<tbody>
{% for gift in gifts %}
<tr class="{% if gift.buyer == user %}info{% else %}{% if gift.buyer %}warning{% endif %}{% endif %}">
{% if show_user %}
<td><a href="/{{ gift.owner.username }}/">{{ gift.owner.get_full_name }}</a></td>
{% endif %}
<td>
{% if gift.buyer and gift.buyer != user %}
<span class="badge pull-right">{% trans "Taken" %}</span>
{% endif %}
{% if gift.private %}
<span class="badge pull-right">{% trans "Private" %}</span>
{% elif gift.buyer and gift.buyer == user %}
<span class="badge pull-right">{% trans "Buying" %}</span>
{% endif %}
<a href="{{ gift.get_absolute_url }}">{{ gift.title }}</a>
</td>
<td>{% if gift.price %}{{ gift.price }}{% else %}<abbr title="{% trans "Not defined" %}">-</abbr>{% endif %}</td>
<td><abbr title="{{ gift.get_priority_display }}">
{% if gift.priority == 1 %}
<span class="glyphicon glyphicon-chevron-down"></span>
{% elif gift.priority == 2 %}
<span class="glyphicon glyphicon-chevron-down text-muted"></span>
{% elif gift.priority == 3 %}
<span class="glyphicon glyphicon-minus text-muted"></span>
{% elif gift.priority == 4 %}
<span class="glyphicon glyphicon-chevron-up text-muted"></span>
{% elif gift.priority == 5 %}
<span class="glyphicon glyphicon-chevron-up"></span>
{% else %}
{{ gift.priority }}
{% endif %}
</abbr></td>
<td class="action">
{% include "gift-actions.html" %}
</td>
</tr>
{% endfor %}
</tbody>
</table>