list.html 3.79 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;
19
20
21
22
23
24
25
        var email=$(this).children('input:first').attr('value');
        if( email.length>0) {
           $.ajax({url: '/confirm/'+$(this).attr('id')+'/'+email, success: function(data) { $(self).html(data); }});
        } else {
           console.log($(this).find('[type=submit]'));
           $(this).find('[type=text]').focus();
        }
stef's avatar
stef committed
26
        return false;
stef's avatar
stef committed
27
     });
stef's avatar
stef committed
28
     $(".confirm > .button").click(function(){
stef's avatar
stef committed
29
30
              $(this).parent().parent().parent().find('.info-validate').toggle();
           });
stef's avatar
stef committed
31
     $(".cancel-button").click(function(){
stef's avatar
stef committed
32
              $(this).parent().hide();
stef's avatar
stef committed
33
34
           });
     });
stef's avatar
stef committed
35
  </script>
stef's avatar
stef committed
36
37
38
{% endblock %}

{%block content%}
stef's avatar
stef committed
39
<div id='global'>
40
41
42
43
44
45
46
{% if messages %}
<ul class="messages">
    {% for message in messages %}
    <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
    {% endfor %}
</ul>
{% endif %}
stef's avatar
stef committed
47
48
<p>{% trans "This is a list of all reported cases of Net Neutrality violations by our users. Please note that we do not validate the accuracy of these reports before they are published on this list, but rather rely on confirmations and supporting evidence offered by users. If you are subjected to one of the listed restrictions, please confirm it. Cases that are not considered violations of Net Neutrality under our guidelines will be removed or not be validated." %}</p>

alct's avatar
alct committed
49
<table class="listing tablesorter zebra-striped" id='sortedlist'>
stef's avatar
stef committed
50
51
  <thead>
<tr>
stef's avatar
stef committed
52
53
54
55
56
   <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
57
   <th filter-type='ddl'>{% trans "fixed / wireless" %}</th>
stef's avatar
stef committed
58
   <th filter='false'>{% trans "confirmations" %}</th>
stef's avatar
stef committed
59
   <th filter='false'></th>
stef's avatar
stef committed
60
61
62
</tr>
  </thead>
  <tbody>
stef's avatar
stef committed
63
{% for violation in violations %}
stef's avatar
stef committed
64
<tr>
stef's avatar
stef committed
65
    <td><a class="cell-link" href="/view/{{violation.pk}}">{{ violation.country|country }}</a></td>
stef's avatar
stef committed
66
67
    <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
68
    <td><a class="cell-link" href="/view/{{violation.pk}}">{{ violation.resource_name }}</a></td>
stef's avatar
stef committed
69
70
71
    <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
72
   <td>
stef's avatar
stef committed
73
      <div class="confirm"><a class="button">{% trans "confirm" %}</a>
stef's avatar
stef committed
74
75
    <div class="info-validate float-confirm">
      <form method="get" id="{{ violation.pk }}" class="confirm_form" >
76
          <label>{% trans "In order to <strong>validate your confirmation</strong> of this case, please enter your email address" %}</label>
stef's avatar
stef committed
77
78
          <input type="text" name="email" />
          <input type="hidden" value="{{ violation.pk }}" />
stef's avatar
stef committed
79
          <input type="submit" value="{% trans "OK" %}" />
stef's avatar
stef committed
80
       </form>
stef's avatar
stef committed
81
       <input class="cancel-button" type="button" value="{% trans "Close" %}" />
stef's avatar
stef committed
82
83
     </div>
    </td>
stef's avatar
stef committed
84
85
86
87
</tr>
{% endfor %}
  </tbody>
</table>
stef's avatar
stef committed
88
</div>
stef's avatar
stef committed
89
{%endblock%}