list.html 3.66 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
  <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;
stef's avatar
stef committed
16
17
18
19
20
21
       var email=$(this).find('input:first').attr('value');
       if(email) {
          $.ajax({url: '/confirm/'+$(this).attr('id')+'/'+email, success: function(data) { $(self).html(data); }});
       } else {
          $(this).parent().find('.email-box').css('color','red');
       };
stef's avatar
stef committed
22
23
       return false;
     });
stef's avatar
stef committed
24
25
26
27
28
29
     $(".confirm > .button").click(function(){
            $(this).next().toggleClass('hidden');
         });
     $(".cancel-button").click(function(){
            $(this).parent().parent().parent().parent().addClass('hidden');
         });
stef's avatar
stef committed
30
31
   });
  </script>
stef's avatar
stef committed
32
33
34
{% endblock %}

{%block content%}
stef's avatar
stef committed
35
<div id='global'>
36
37
38
39
40
41
42
{% 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
43
<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>
44
<table class="listing tablesorter" id='sortedlist'>
stef's avatar
stef committed
45
46
  <thead>
<tr>
stef's avatar
stef committed
47
48
49
50
51
   <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
52
   <th filter-type='ddl'>{% trans "fixed / wireless" %}</th>
stef's avatar
stef committed
53
   <th filter='false'>{% trans "confirmations" %}</th>
stef's avatar
stef committed
54
55
56
</tr>
  </thead>
  <tbody>
stef's avatar
stef committed
57
{% for violation in violations %}
stef's avatar
stef committed
58
<tr>
stef's avatar
stef committed
59
60
61
62
63
64
    <td><a class="cell-link" href="/view/{{violation.pk}}">{{ violation.country }}</a></td>
    <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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
    <td>{{ violation.confirmations }} <div class="confirm"><a class="button">+1</a>
      <div class="hidden confirm_popup alpha60">
         <div>
            <h3>{% trans "Confirmation" %}</h3>
            <div>
            <small>{% trans "I attest the existence of this infringement" %}<br />
            <a href="/view/{{violation.pk}}">{{ violation.operator }} ({{ violation.country }}) {{ violation.contract }}</a></small>
            <form method="get" class="confirm_form" id="{{ violation.pk }}">
               <div class="email-box">{% trans "E-mail" %}: <input type="text" name="email" /></div>
               //{% trans "required" %}<br />
               <input type="hidden" value="{{ violation.pk }}" />
               <input type="submit" value="confirm" />
               <input class="cancel-button" type="button" value="{% trans "cancel" %}" />
            </form>
            </div>
         </div>
      </div>
stef's avatar
stef committed
82
    </td>
stef's avatar
stef committed
83
84
85
86
</tr>
{% endfor %}
  </tbody>
</table>
stef's avatar
stef committed
87
</div>
stef's avatar
stef committed
88
{%endblock%}