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

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