list.html 5.61 KB
Newer Older
stef's avatar
stef committed
1 2 3 4
{% extends "base.html" %}
{% load bt %}
{% load i18n %}
{% block styles %}
stef's avatar
stef committed
5
   <link rel="stylesheet" href="{{ MEDIA_URL }}/css/map.css" type="text/css" />
stef's avatar
stef committed
6
{% endblock %}
stef's avatar
stef committed
7 8 9 10 11 12

{% block head %}
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
{% endblock %}


stef's avatar
stef committed
13
{% block scripts %}
stef's avatar
stef committed
14
  <script type="text/javascript" src="{{ MEDIA_URL }}/js/script.min.js"></script>
stef's avatar
stef committed
15
  <script type="text/javascript">
stef's avatar
stef committed
16 17 18 19 20
     $script(['{{ MEDIA_URL }}/js/jquery.min.js'], 'jquery');
     $script(["{{ MEDIA_URL }}/js/jquery.tablesorter.min.js", "{{ MEDIA_URL }}/js/picnet.table.filter.min.js"], 'tables');
     $script(['{{ MEDIA_URL }}/js/raphael.min.js', '{{ MEDIA_URL }}/js/kartograph.min.js', '{{ MEDIA_URL }}/js/chroma.min.js', '{{ MEDIA_URL }}/js/qtip.min.js'], 'kartograph');
  </script>
  <script type="text/javascript">
stef's avatar
stef committed
21 22
     var data={% if countryweights %}{{countryweights|safe}}{%else%}null{% endif %};
     var country="{{country}}";
stef's avatar
stef committed
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
     $script.ready(['jquery','tables'], function() {
        $(document).ready(function() {
          $.tablesorter.addParser({
              // set a unique id
              id: 'stateparser',
              is: function(s) {
                  // return false so this parser is not auto detected
                  return false;
              },
              format: function(s) {
                  // format your data for normalization
                  return s{% for s, translation in status %}.replace(/{{translation}}/,{{forloop.counter}}){% endfor %};
              },
              // set type, either numeric or text
              type: 'numeric'
          });
          $("#sortedlist").tablesorter({
              headers: { 8: { sorter: false },
                         0: { sorter: 'stateparser' }},
              sortList: [[1,0],[0,0],[7,1]],
          });
          var options = { enableCookies: false };
          $('#sortedlist').tableFilter(options);
          $('.confirm_form').submit(function() {
             var self=this;
             var email=$(this).find('input:first').attr('value');
             if( email.length>0) {
                $.ajax({url: '/confirm/'+$(this).attr('id').slice(1)+'/'+email, success: function(data) { $(self).html(data); }});
             } else {
                $(this).find('[type=text]').focus();
             }
54
             return false;
stef's avatar
stef committed
55 56 57 58 59 60 61 62
          });
          $(".confirm > .button").click(function(){
                   $(this).parent().parent().parent().find('.info-validate').toggle();
                });
          $(".cancel-button").click(function(){
                   $(this).parent().hide();
                });
          });
stef's avatar
stef committed
63
     });
stef's avatar
stef committed
64
  </script>
stef's avatar
stef committed
65
  <script type="text/javascript" src="{{ MEDIA_URL }}/js/map.js"></script>
stef's avatar
stef committed
66 67 68
{% endblock %}

{%block content%}
stef's avatar
stef committed
69
<div id='global'>
70 71 72 73 74 75 76
{% if messages %}
<ul class="messages">
    {% for message in messages %}
    <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
    {% endfor %}
</ul>
{% endif %}
77
{% trans "Reported Cases" %}
stef's avatar
stef committed
78
<div id="map"> </div>
stef's avatar
stef committed
79
<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>
stef's avatar
stef committed
80
</div>
stef's avatar
stef committed
81

alct's avatar
alct committed
82
<table class="listing tablesorter zebra-striped" id='sortedlist'>
stef's avatar
stef committed
83 84
  <thead>
<tr>
85
   <th filter-type='ddl'>{% trans "Status" %}</th>
stef's avatar
stef committed
86 87 88 89 90
   <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
91
   <th filter-type='ddl'>{% trans "fixed / wireless" %}</th>
stef's avatar
stef committed
92
   <th filter='false'>{% trans "confirmations" %}</th>
stef's avatar
stef committed
93
   <th filter='false'></th>
stef's avatar
stef committed
94 95 96
</tr>
  </thead>
  <tbody>
stef's avatar
stef committed
97
{% for violation in violations %}
98
<tr class="{%if violation.state%}{{violation.state}}{%else%}new{%endif%}-status">
stef's avatar
stef committed
99
    <td><a class="cell-link" href="/view/{{violation.pk}}">{%if violation.state%}{{violation.state|status}}{%else%}{% trans "New" %}{%endif%}</a></td>
stef's avatar
stef committed
100
    <td><a class="cell-link" href="/view/{{violation.pk}}">{{ violation.country|country }}</a></td>
stef's avatar
stef committed
101 102
    <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
103
    <td><a class="cell-link" href="/view/{{violation.pk}}">{{ violation.resource_name }}</a></td>
104 105
    <td><a class="cell-link" href="/view/{{violation.pk}}">{{ violation.type|type }}</a></td>
    <td><a class="cell-link" href="/view/{{violation.pk}}">{{ violation.media|media }}</a></td>
stef's avatar
stef committed
106
    <td>{{ violation.confirmations }}</td>
stef's avatar
stef committed
107
   <td>
108
      <div class="confirm"><a class="button">{% trans "Me too!" %}</a>
stef's avatar
stef committed
109
         <div class="info-validate float-confirm">
stef's avatar
stef committed
110
            <form method="get" action="" id="i{{ violation.pk }}" class="confirm_form" >
stef's avatar
stef committed
111
               <div>
112
                  <label>{% trans "In order to <strong>confirm</strong> this report, please enter your email address" %}</label>
stef's avatar
stef committed
113 114 115 116 117 118 119 120
                  <input type="text" name="email" />
                  <input type="hidden" value="{{ violation.pk }}" />
                  <input type="submit" value="{% trans "OK" %}" />
               </div>
            </form>
            <input class="cancel-button" type="button" value="{% trans "Close" %}" />
         </div>
      </div>
stef's avatar
stef committed
121
    </td>
stef's avatar
stef committed
122 123 124 125
</tr>
{% endfor %}
  </tbody>
</table>
stef's avatar
stef committed
126
</div>
stef's avatar
stef committed
127
{%endblock%}