list.html 3.31 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
  <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() {
stef's avatar
stef committed
12
13
14
15
         $("#sortedlist").tablesorter({ 
            headers: { 7: { sorter: false },},
            sortList: [[0,0],[1,0]],
         });
stef's avatar
stef committed
16
17
     $('#sortedlist').tableFilter();
     $('.confirm_form').submit(function() {
stef's avatar
stef committed
18
        var self=this;
stef's avatar
stef committed
19
        $.ajax({url: '/confirm/'+$(this).attr('id')+'/'+$(this).children('input:first').attr('value'), success: function(data) { $(self).html(data); }});
stef's avatar
stef committed
20
        return false;
stef's avatar
stef committed
21
     });
stef's avatar
stef committed
22
     $(".confirm > .button").click(function(){
stef's avatar
stef committed
23
24
              $(this).parent().parent().parent().find('.info-validate').toggle();
           });
stef's avatar
stef committed
25
     $(".cancel-button").click(function(){
stef's avatar
stef committed
26
27
28
              $(this).parent().parent().hide();
           });
     });
stef's avatar
stef committed
29
  </script>
stef's avatar
stef committed
30
31
32
{% endblock %}

{%block content%}
stef's avatar
stef committed
33
<div id='global'>
34
35
36
37
38
39
40
{% if messages %}
<ul class="messages">
    {% for message in messages %}
    <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
    {% endfor %}
</ul>
{% endif %}
41
<p>{% trans "This is a list of all reported violations of net neutrality. See <a href='/about'>What is net neutrality</a> for a short explanation. " %}</p>
alct's avatar
alct committed
42
<table class="listing tablesorter zebra-striped" id='sortedlist'>
stef's avatar
stef committed
43
44
  <thead>
<tr>
stef's avatar
stef committed
45
46
47
48
49
   <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>
stef's avatar
stef committed
50
   <th filter-type='ddl'>{% trans "fixed / wireless" %}</th>
stef's avatar
stef committed
51
   <th filter='false'>{% trans "confirmations" %}</th>
stef's avatar
stef committed
52
   <th filter='false'></th>
stef's avatar
stef committed
53
54
55
</tr>
  </thead>
  <tbody>
stef's avatar
stef committed
56
{% for violation in violations %}
stef's avatar
stef committed
57
<tr>
stef's avatar
stef committed
58
    <td><a class="cell-link" href="/view/{{violation.pk}}">{{ violation.country|country }}</a></td>
stef's avatar
stef committed
59
60
    <td><a class="cell-link" href="/view/{{violation.pk}}">{{ violation.operator }}</a></td>
    <td><a class="cell-link" href="/view/{{violation.pk}}">{{ violation.contract }}</a></td>
stef's avatar
stef committed
61
    <td><a class="cell-link" href="/view/{{violation.pk}}">{{ violation.resource_name }}</a></td>
stef's avatar
stef committed
62
63
64
    <td><a class="cell-link" href="/view/{{violation.pk}}">{{ violation.type }}</a></td>
    <td><a class="cell-link" href="/view/{{violation.pk}}">{{ violation.media }}</a></td>
    <td>{{ violation.confirmations }}</td>
stef's avatar
stef committed
65
   <td>
stef's avatar
stef committed
66
      <div class="confirm"><a class="button">{% trans "confirm" %}</a>
stef's avatar
stef committed
67
68
    <div class="info-validate float-confirm">
      <form method="get" id="{{ violation.pk }}" class="confirm_form" >
69
          <label>{% trans "In order to <strong>validate your confirmation</strong> of this case, please enter your email address" %}</label>
stef's avatar
stef committed
70
71
          <input type="text" name="email" />
          <input type="hidden" value="{{ violation.pk }}" />
stef's avatar
stef committed
72
          <input type="submit" value="{% trans "OK" %}" />
stef's avatar
stef committed
73
74
75
76
          <input class="cancel-button" type="button" value="{% trans "cancel" %}" />
       </form>
     </div>
    </td>
stef's avatar
stef committed
77
78
79
80
</tr>
{% endfor %}
  </tbody>
</table>
stef's avatar
stef committed
81
</div>
stef's avatar
stef committed
82
{%endblock%}