list.html 2.69 KB
Newer Older
stef's avatar
stef committed
1
2
3
4
5
6
{% extends "base.html" %}
{% load bt %}
{% load i18n %}
{% block styles %}
{% endblock %}
{% block scripts %}
stef's avatar
stef committed
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  <script type="text/javascript" src="{%media_url%}/js/jquery.1.4.2.min.js"></script>
  <script type="text/javascript" src="{%media_url%}/js/jquery.tablesorter.min.js"> </script>
  <script type="text/javascript" src="{%media_url%}/js/picnet.table.filter.min.js"></script>
  <script type="text/javascript">
   $(document).ready(function() {
     $("#sortedlist").tablesorter();
     $('#sortedlist').tableFilter();
     $('.confirm_form').submit(function() {
       var self=this;
       $.ajax({url: '/confirm/'+$(this).attr('id')+'/'+$(this).children('input:first').attr('value'), success: function(data) { $(self).html(data); }});
       return false;
     });
   });
  </script>
stef's avatar
stef committed
21
22
23
{% endblock %}

{%block content%}
stef's avatar
stef committed
24
<div id='container'>
25
26
27
28
29
30
31
32
{% 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
33
34
  <thead>
<tr>
stef's avatar
stef committed
35
36
37
38
39
40
41
42
43
44
45
   <th filter='false'>{% trans "id" %}</th>
   <th filter-type='ddl'>{% trans "country" %}</th>
   <th filter-type='ddl'>{% trans "operator" %}</th>
   <th filter-type='ddl'>{% trans "contract" %}</th>
   <th filter-type='ddl'>{% trans "resource" %}</th>
   <th filter-type='ddl'>{% trans "type" %}</th>
   <th filter-type='ddl'>{% trans "media" %}</th>
   <th filter-type='ddl'>{% trans "temporary" %}</th>
   <th filter-type='ddl'>{% trans "contractual" %}</th>
   <th filter-type='ddl'>{% trans "loophole" %}</th>
   <th filter='false'>{% trans "confirmations" %}</th>
stef's avatar
stef committed
46
47
48
</tr>
  </thead>
  <tbody>
stef's avatar
stef committed
49
{% for violation in violations %}
stef's avatar
stef committed
50
<tr>
51
    <td><a href="/view/{{violation.pk}}">#{{ violation.pk }}</a></td>
stef's avatar
stef committed
52
53
54
55
56
57
58
59
60
    <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.loophole }}</td>
stef's avatar
stef committed
61
    <td>{{ violation.confirmations }} <div class="confirm"><a>+1</a>
stef's avatar
stef committed
62
63
64
65
66
67
68
69
70
71
72
73
74
          <div class="hidden confirm_popup">
             <h3>Confirmation</h3>
             <p>
             <form method="get" class="confirm_form" id="{{ violation.pk }}">
                E-mail: <input type="text" name="email" /><br />
                //required<br />
                <input type="hidden" value="{{ violation.pk }}" />
                <input type="submit" value="confirm" />
             </form>
             </p>
          </div>
       </div>
    </td>
stef's avatar
stef committed
75
76
77
78
</tr>
{% endfor %}
  </tbody>
</table>
stef's avatar
stef committed
79
</div>
stef's avatar
stef committed
80
{%endblock%}