list.html 4.04 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 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
<script type="text/javascript">
var data={% if countryweights %}{{countryweights|safe}}{%else%}[]{% endif %};
var country="{{country}}";
// Table sorter
$.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'
});
</script>
Okhin's avatar
Okhin committed
33 34
{% endblock %}

35
{% block content %}
Okhin's avatar
Okhin committed
36
<div id='global'>
37 38 39 40 41 42 43 44 45 46
	{% if messages %}
	<ul class="messages">
		{% for message in messages %}
		<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
		{% endfor %}
	</ul>
	{% endif %}
	{% 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
47
</div>
Okhin's avatar
Okhin committed
48

49 50 51 52 53 54 55 56
<div class="table-responsive" id="table">
	<table class="table table-striped table-condensed" id='sortedlist'>
		<thead>
			<tr>
				<th filter-type='ddl' class="col-sm-1">{% trans "Status" %}</th>
				<th filter-type='ddl' class="col-sm-1">{% trans "country" %}</th>
				<th filter-type='ddl' class="col-sm-1">{% trans "operator" %}</th>
				<th filter-type='ddl' class="col-sm-2">{% trans "contract" %}</th>
57
				<th filter-type='ddl' class="col-sm-2">{% trans "resource" %}</th>
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
				<th filter-type='ddl' class="col-sm-1">{% trans "type" %}</th>
				<th filter-type='ddl' class="col-sm-1">{% trans "fixed / wireless" %}</th>
				<th filter='false' class="col-sm-1">{% trans "confirmations" %}</th>
				<th filter='false' class="col-sm-1"></th>
			</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>
					<div class="confirm"><a class="button">{% trans "Me too!" %}</a>
						<div class="info-validate float-confirm">
							<form method="get" action="" id="i{{ violation.pk }}" class="confirm_form" >
								<div>
									<label>{% trans "In order to <strong>confirm</strong> this report, please enter your email address" %}</label>
									<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>
88
					</div>
89 90 91 92 93 94
				</td>
			</tr>
			{% endfor %}
		</tbody>
	</table>
</div>
Okhin's avatar
Okhin committed
95
{%endblock%}