index.html 5.74 KB
Newer Older
Okhin's avatar
Okhin committed
1
2
3
4
5
{% extends "base.html" %}
{% load bt %}
{% load i18n %}
{% block active_tab_home %}id="current"{% endblock %}
{% block styles %}
6
<link rel="stylesheet" type="text/css" media="all" href="/static/css/jquery-ui.css" />
Okhin's avatar
Okhin committed
7
8
9
{% endblock %}

{% block scripts %}
Okhin's avatar
Okhin committed
10
<script type="text/javascript">
Okhin's avatar
Okhin committed
11
function focushandlers(ed) {
12
13
14
15
16
17
18
19
20
21
22
23
24
25
	var s = ed.settings;
	var realID = $('#'+ed.id+'_tbl');
	tinymce.dom.EventUtils.bind(ed.getWin(), 'focus', function(e) {
		if($(realID)) {
			/console.log(realID);
			realID.parents('.fieldWrapper').find('.help_text').show();
		}
	});
	tinymce.dom.EventUtils.bind(ed.getWin(), 'blur', function(e) {
		if($(realID)) {
			/console.log(realID);
			realID.parents('.fieldWrapper').find('.help_text').hide();
		}
	});
Okhin's avatar
Okhin committed
26
27
}
$(document).ready(function(){
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
	{% if not form.is_bound %}
	$(".fieldWrapper").hide();
	$("#id_resource_name").parent().parent().show();
	$("#id_country").parent().parent().show();
	$("#id_operator").parent().parent().show();
	$("#id_contract").parent().parent().show();
	$("#id_media").parent().parent().show();
	$("#save_button").hide();
	{% else %}
	if($("#id_contractual").attr('checked')==false) {
		$("#id_contract_excerpt").parent().parent().hide();
	}
	$("#show_optionals").show();
	$("#optional .fieldWrapper").hide();
	if ($('#id_email').val().length>0) {
		$('#id_captcha_0').parent().parent().show();
		$('#save_button').removeAttr('disabled');
		$("#show_optionals").show();
	}
	{% endif %}
Okhin's avatar
Okhin committed
48
</script>
Okhin's avatar
Okhin committed
49
50
51
52
{% endblock %}

{%block content%}
<div id='global'>
53
54
55
56
57
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
88
89
90
91
92
93
	{% if messages %}
	<ul class="messages">
		{% for message in messages %}
		<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message|safe }}</li>
		{% endfor %}
	</ul>
	{% endif %}
	<div id='addForm' class='index'>
		<h2>{% trans "Add New Case" %}</h2>
		<p>{% trans "Please report cases of operators restricting or throttling access to content, services or applications. For a more precise description of what to report, check our <a href='/about/#guidelines'>guidelines</a>." %}
		<form name="addForm" enctype="multipart/form-data" action="{% root_url %}/add/" method="post">
			{% for field in form %}
			{% if field.html_name = 'comment' %}<div class="hidden errorlist">{% trans "There are already some reports for this Operator/Contract, please check if yours is already among them:" %}<ul id="similar_cases"></ul></div>{%endif%}
			{% if field.html_name = 'resource' %}<div id="show_optionals">{% trans "Provide optional details" %}</div><div id="optional">{%endif%}
				<div class="fieldWrapper">
					{% if field.help_text %}<span class="help_text">{{ field.help_text }}</span>{% endif %}
					<span class="innerfield">
						{{ field.errors }}
						{{ field.label_tag }} {{ field }}
					</span>
				</div>
				{% endfor %}
			</div>
			{% csrf_token %}
			<input id="save_button" type="submit" value="{% trans "save" %}" />
		</form>
	</div>
	<div id='content'>
		<h2>{% trans "On the Internet, <strong>you</strong> decide what you do, right? <i>Not anymore!</i>" %}</h2>
		<p>{% trans "Large telecommunication providers want to control what you do online. They want to block and throttle some of your communications, and charge you to use certain online services, content and applications." %}</p>
		<p>{% trans "Now is the time to fight back!" %}</p>
		<p>{% trans "Help us chart all the ways that internet providers are violating our online freedom. Tell us about how your landline or mobile operator Internet provider restricts your connection. You can do so in less than two minutes!" %}
		<p>{% trans "We will report these violations to the European Commission and national authorities and demand action to address them." %}</p>
		<p>{% trans "Don't hesitate to give us feedback on this application by reporting any idea or issue with RespectMyNet.eu here : <a href='https://nnmon.quadpad.lqdn.fr/feedback'>Feedback pad page</a>" %}</p>
		<h2 id="stats-title">{% trans "Statistics" %}</h2>
		<div id="stats_graph" ></div>
		<ul id="stats">
			{% for t, n in stats %}
			<li class="stat"><dl><dt class="inline">{{t}}</dt><dd class="inline"><strong>{{n}}</strong></dd></dl></li>
			{% endfor %}
		</ul>
Okhin's avatar
Okhin committed
94

95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
		<h2 id="featured-title">{% trans "Featured Cases" %}</h2>
		<table id="featured_cases">
			<thead>
				<tr>
					<th style="width: 70%;">{% trans "Infringing offering" %}</th>
					<th>{% trans "Confirmed" %}</th>
					<th></th>
				</tr>
			</thead>
			<tbody>
				{% for violation in violations %}
				<tr>
					<td><a href="{{ violation.get_absolute_url }}">{{ violation.operator }} ({{ violation.country|country }}) {{ violation.contract }}</a>
						<div class="info-validate">
							<form method="get" id="{{ violation.pk }}" class="confirm_form" >
								<label>{% trans "In order to <strong>confirm</strong> this report, please enter your email address" %}</label>
								<br/><input type="text" name="email" />
								<input type="submit" value="{% trans "OK" %}" />
								<input type="button" value="{% trans "Cancel" %}" class="cancel-button" />
								<input type="hidden" value="{{ violation.pk }}" />
							</form>
						</div>
					</td>
					<td class='align-right'>{{ violation.confirmations }}</td>
					<td class='align-right'><input type="button" class="confirm button" value="{% trans "Me too!" %}" />
					</td>
				</tr>
				<tr>
					<td colspan="3">
						<div id="description" class='round-box'>
							<strong>{% trans "Affected Resource" %}:</strong> {{violation.resource_name}}
							{%for c in violation.comment_set.all%}
							<div class="description">{{c.comment|safe}}</div>
							<span class="submitter">{%if c.submitter_name%}{{c.submitter_name}}{%else%}{{c.submitter_email}}{%endif%}</span> - <span class="comment_date">{{c.timestamp|date:"SHORT_DATE_FORMAT" }}</span>
						</div>
						{%endfor%}
	</div>
					</td>
				</tr>
				{% endfor %}
			</tbody>
		</table>
Okhin's avatar
Okhin committed
137
138
</div>
</div>
Okhin's avatar
Okhin committed
139
{%endblock%}