list.html 3.81 KB
Newer Older
stef's avatar
stef committed
1
2
3
{% extends "base.html" %}
{% load bt %}
{% load i18n %}
Benjamin Sonntag's avatar
Benjamin Sonntag committed
4
{% load babel %}
stef's avatar
stef committed
5
6
7
{% block styles %}
{% endblock %}
{% block scripts %}
stef's avatar
stef committed
8
9
10
11
12
  <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
13
14
15
16
         $("#sortedlist").tablesorter({ 
            headers: { 7: { sorter: false },},
            sortList: [[0,0],[1,0]],
         });
stef's avatar
stef committed
17
18
     $('#sortedlist').tableFilter();
     $('.confirm_form').submit(function() {
stef's avatar
stef committed
19
        var self=this;
20
21
22
23
24
25
26
        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
27
        return false;
stef's avatar
stef committed
28
     });
stef's avatar
stef committed
29
     $(".confirm > .button").click(function(){
stef's avatar
stef committed
30
31
              $(this).parent().parent().parent().find('.info-validate').toggle();
           });
stef's avatar
stef committed
32
     $(".cancel-button").click(function(){
stef's avatar
stef committed
33
              $(this).parent().hide();
stef's avatar
stef committed
34
35
           });
     });
stef's avatar
stef committed
36
  </script>
stef's avatar
stef committed
37
38
39
{% endblock %}

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