list.html 2.16 KB
Newer Older
stef's avatar
stef committed
1
2
3
4
5
6
7
{% extends "base.html" %}
{% load bt %}
{% load i18n %}
{% block styles %}
{% endblock %}
{% block scripts %}
<script type="text/javascript" src="{%media_url%}/js/jquery.1.4.2.min.js"></script>
8
9
10
11
12
13
    <script type="text/javascript" src="{%media_url%}/js/jquery.tablesorter.min.js"> </script>
    <script type="text/javascript">
     $(document).ready(function() {
           $("#sortedlist").tablesorter();
     });
    </script>
stef's avatar
stef committed
14
15
16
{% endblock %}

{%block content%}
17
18
19
20
21
22
23
24
{% if messages %}
<ul class="messages">
    {% for message in messages %}
    <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
    {% endfor %}
</ul>
{% endif %}
<table class="listing tablesorter" id='sortedlist'>
stef's avatar
stef committed
25
26
  <thead>
<tr>
stef's avatar
stef committed
27
28
29
30
31
32
33
34
35
36
37
   <th>{% trans "id" %}</th>
   <th>{% trans "country" %}</th>
   <th>{% trans "operator" %}</th>
   <th>{% trans "contract" %}</th>
   <th>{% trans "resource" %}</th>
   <th>{% trans "type" %}</th>
   <th>{% trans "media" %}</th>
   <th>{% trans "temporary" %}</th>
   <th>{% trans "contractual" %}</th>
   <th>{% trans "contractual_excerpt" %}</th>
   <th>{% trans "loophole" %}</th>
stef's avatar
stef committed
38
39
40
41
42
</tr>
  </thead>
  <tbody>
{% for violation in violations.object_list %}
<tr>
43
    <td><a href="/view/{{violation.pk}}">#{{ violation.pk }}</a></td>
stef's avatar
stef committed
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
    <td>{{ violation.country }}</td>
    <td>{{ violation.operator }}</td>
    <td>{{ violation.contract }}</td>
    <td>{{ violation.resource }}</td>
    <td>{{ violation.type }}</td>
    <td>{{ violation.media }}</td>
    <td>{{ violation.temporary }}</td>
    <td>{{ violation.contractual }}</td>
    <td>{{ violation.contractual_excerpt }}</td>
    <td>{{ violation.loophole }}</td>
</tr>
{% endfor %}
  </tbody>
</table>

<div class="pagination">
    <span class="step-links">
        {% if violations.has_previous %}
            <a href="?page={{ violations.previous_page_number }}">previous</a>
        {% endif %}

        <span class="current">
stef's avatar
stef committed
66
           {% trans "Page" %} {{ violations.number }} {% trans "of" %} {{ violations.paginator.num_pages }}.
stef's avatar
stef committed
67
68
69
        </span>

        {% if violations.has_next %}
stef's avatar
stef committed
70
        <a href="?page={{ violations.next_page_number }}">{% trans "next" %}</a>
stef's avatar
stef committed
71
72
73
74
        {% endif %}
    </span>
</div>
{%endblock%}