list.html 4.08 KB
Newer Older
Okhin's avatar
Okhin committed
1
2
3
{% extends "base.html" %}
{% load bt %}
{% load i18n %}
4
{% block active_tab_cases %}class="active"{% endblock %}
Okhin's avatar
Okhin committed
5
{% block styles %}
6
<link rel="stylesheet" href="/static/css/map.css" type="text/css" />
Okhin's avatar
Okhin committed
7
8
9
{% endblock %}

{% block head %}
10
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Okhin's avatar
Okhin committed
11
12
13
{% endblock %}

{% block scripts %}
14
15
16
<script type="text/javascript">
var data={% if countryweights %}{{countryweights|safe}}{%else%}[]{% endif %};
var country="{{country}}";
17
18
19
20
21
22
23
24
25
26
27
28
$('.metoo').submit(function(event) {
	event.preventDefault();
	var form = $(this);
	var pk = $(form).attr("id")
	var email = $(form).find("#email-" + pk).val();

	$.ajax({
		url: "/confirm/" + pk + "/" + email,
		success: function(data) {
			form.find("div").html(data);
		}
	});
Okhin's avatar
Okhin committed
29
30
$("#sortedList").tablesorter({
	theme: 'dropbox',
31
32
});
</script>
Okhin's avatar
Okhin committed
33
34
{% endblock %}

35
{% block content %}
Okhin's avatar
Okhin committed
36
<div id='global'>
37
38
39
	{% trans "Reported Cases" %}
	<div id="map"> </div>
	<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>
Okhin's avatar
Okhin committed
40
</div>
Okhin's avatar
Okhin committed
41

42
<div class="table-responsive" id="table">
Okhin's avatar
Okhin committed
43
	<table class="table table-striped table-condensed tablesorter" id='sortedlist'>
44
45
		<thead>
			<tr>
Okhin's avatar
Okhin committed
46
47
48
49
50
51
52
53
54
				<th>{% trans "Status" %}</th>
				<th>{% trans "country" %}</th>
				<th>{% trans "operator" %}</th>
				<th>{% trans "contract" %}</th>
				<th>{% trans "resource" %}</th>
				<th>{% trans "type" %}</th>
				<th>{% trans "fixed / wireless" %}</th>
				<th>{% trans "confirmations" %}</th>
				<th></th>
55
56
57
58
59
60
61
62
63
64
65
66
67
68
			</tr>
		</thead>
		<tbody>
			{% for violation in violations %}
			<tr class="{%if violation.state%}{{violation.state}}{%else%}new{%endif%}-status">
				<td><a class="cell-link" href="{{ violation.get_absolute_url }}">{%if violation.state%}{{violation.state|status}}{%else%}{% trans "New" %}{%endif%}</a></td>
				<td><a class="cell-link" href="{{ violation.get_absolute_url }}">{{ violation.country|country }}</a></td>
				<td><a class="cell-link" href="{{ violation.get_absolute_url }}">{{ violation.operator }}</a></td>
				<td><a class="cell-link" href="{{ violation.get_absolute_url }}">{{ violation.contract }}</a></td>
				<td><a class="cell-link" href="{{ violation.get_absolute_url }}">{{ violation.resource_name }}</a></td>
				<td><a class="cell-link" href="{{ violation.get_absolute_url }}">{{ violation.type|type }}</a></td>
				<td><a class="cell-link" href="{{ violation.get_absolute_url }}">{{ violation.media|media }}</a></td>
				<td>{{ violation.confirmations }}</td>
				<td>
Okhin's avatar
Okhin committed
69
70
71
72
					<button role="button" class="btn btn-default" data-toggle="modal" data-target="#modal-{{ violation.pk }}">{% trans "Me too!" %}</button>
					<div class="modal fade" id="modal-{{ violation.pk }}" tabindex="-1" role="dialog" aria-labelledby="modal-label-{{ violation.pk }}" data-backdrop="false">
						<div class="modal-dialog">
							<div class="modal-content">
73
								<form method="post" class="metoo inline-from" action="/confirm/{{ violation.pk }}" id="i{{ violation.pk }}">
Okhin's avatar
Okhin committed
74
75
76
77
78
79
80
81
82
83
84
85
86
87
									<div class="modal-body">
										<div class="form-group">
											<label for="list-email-{{ violation.pk }}">{% trans "In order to <strong>confirm</strong> this report, please enter your email address" %}</label>
											<input type="text" name="email" id="list-email-{{ violation.pk }}" placeholder="email" />
											<input type="hidden" value="{{ violation.pk }}" />
											{% csrf_token %}
										</div>
										<div class="button-box">
											<button class="btn btn-success" type="submit">{% trans "OK" %}</button>
											<button class="btn btn-danger" type="button" data-dismiss="modal">{% trans "Close" %}</button>
										</div>
									</div>
								</form>
							</div>
88
						</div>
89
					</div>
90
91
92
93
94
95
				</td>
			</tr>
			{% endfor %}
		</tbody>
	</table>
</div>
Okhin's avatar
Okhin committed
96
{%endblock%}