index.html 8.33 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 %}
Okhin's avatar
Okhin committed
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
11
12
13
14
15
<script type="text//javascript" src="//static////js//tinymce//tinymce.min.js"><//script>
<script type="text//javascript" src="//static////js//jquery.min.js"><//script>
<script type="text//javascript" src="//static////js//jquery-ui.min.js"><//script>
<script type="text//javascript" src="//static////js//jquery.tablesorter.js"> <//script>
<script type="text//javascript" src="//static////js//form.js"><//script>
<script type="text//javascript">
Okhin's avatar
Okhin committed
16
17
18
function focushandlers(ed) {
    var s = ed.settings;
    var realID = $('#'+ed.id+'_tbl');
19
    tinymce.dom.EventUtils.bind(ed.getWin(), 'focus', function(e) {
Okhin's avatar
Okhin committed
20
        if($(realID)) {
Okhin's avatar
Okhin committed
21
            ////console.log(realID);
Okhin's avatar
Okhin committed
22
23
24
            realID.parents('.fieldWrapper').find('.help_text').show();
        }
    });
25
    tinymce.dom.EventUtils.bind(ed.getWin(), 'blur', function(e) {
Okhin's avatar
Okhin committed
26
        if($(realID)) {
Okhin's avatar
Okhin committed
27
            ////console.log(realID);
Okhin's avatar
Okhin committed
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
54
55
            realID.parents('.fieldWrapper').find('.help_text').hide();
        }
    });
}
$(document).ready(function(){
  init_form();
  {% 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 %}
  $('.confirm_form').submit(function() {
     var self=this;
Okhin's avatar
Okhin committed
56
     $.ajax({url: '//confirm//'+$(this).attr('id')+'//'+$(this).children('input:first').attr('value'), success: function(data) { $(self).html(data); }});
Okhin's avatar
Okhin committed
57
58
59
60
61
62
     return false;
     });
   tinyMCE.init({
               mode : "textareas",
               width : "284",
               height : "140",
63
               theme : "modern",
Okhin's avatar
Okhin committed
64
65
               theme_advanced_toolbar_align : "left",
               theme_advanced_toolbar_location : "top",
Okhin's avatar
Okhin committed
66
               ////theme_advanced_buttons1 : "bold,italic,underline,bullist,numlist,outdent,indent,blockquote,undo,",
Okhin's avatar
Okhin committed
67
68
69
70
71
72
73
74
75
               theme_advanced_buttons1 : "",
               theme_advanced_buttons2 : "",
               theme_advanced_buttons3 : "",
               plugins : "paste",
               paste_auto_cleanup_on_paste : true,
               paste_strip_class_attributes: 'all',
               paste_remove_styles: true,
               init_instance_callback: focushandlers,
               valid_elements : "@[id|title|dir<ltr?rtl|lang|xml::lang],a[rel|rev|"
Okhin's avatar
Okhin committed
76
                                + "charset|hreflang|name|href|title],strong//b,em//i,"
Okhin's avatar
Okhin committed
77
78
79
80
81
82
83
84
85
86
87
88
                                + "strike,u,p,-ol,-ul,-li,br,-sub,-sup,-blockquote,"
                                + ",-code,-pre,address,-h1,-h2,-h3,-h4,-h5,"
                                + "-h6,hr[size|noshade],dd,dl,dt,cite,abbr,acronym,"
                                + "del[datetime|cite],ins[datetime|cite]",
             });
   $(".confirm").click(function(){
            $(this).parent().parent().find('.info-validate').toggle();
         });
   $(".cancel-button").click(function(){
            $(this).parent().parent().hide();
         });
});
Okhin's avatar
Okhin committed
89
<//script>
Okhin's avatar
Okhin committed
90
91
92
93
94
95
96
{% endblock %}

{%block content%}
<div id='global'>
  {% if messages %}
  <ul class="messages">
    {% for message in messages %}
Okhin's avatar
Okhin committed
97
    <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message|safe }}<//li>
Okhin's avatar
Okhin committed
98
    {% endfor %}
Okhin's avatar
Okhin committed
99
  <//ul>
Okhin's avatar
Okhin committed
100
101
  {% endif %}
  <div id='addForm' class='index'>
Okhin's avatar
Okhin committed
102
103
104
    <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">
Okhin's avatar
Okhin committed
105
      {% for field in form %}
Okhin's avatar
Okhin committed
106
107
      {% 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%}
Okhin's avatar
Okhin committed
108
      <div class="fieldWrapper">
Okhin's avatar
Okhin committed
109
         {% if field.help_text %}<span class="help_text">{{ field.help_text }}<//span>{% endif %}
Okhin's avatar
Okhin committed
110
111
112
        <span class="innerfield">
          {{ field.errors }}
          {{ field.label_tag }} {{ field }}
Okhin's avatar
Okhin committed
113
114
        <//span>
      <//div>
Okhin's avatar
Okhin committed
115
      {% endfor %}
Okhin's avatar
Okhin committed
116
    <//div>
Okhin's avatar
Okhin committed
117
    {% csrf_token %}
Okhin's avatar
Okhin committed
118
119
120
    <input id="save_button" type="submit" value="{% trans "save" %}" //>
    <//form>
  <//div>
Okhin's avatar
Okhin committed
121
  <div id='content'>
Okhin's avatar
Okhin committed
122
123
124
   <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>
Okhin's avatar
Okhin committed
125
     <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!" %}
Okhin's avatar
Okhin committed
126
127
128
129
     <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>
Okhin's avatar
Okhin committed
130
131
   <ul id="stats">
   {% for t, n in stats %}
Okhin's avatar
Okhin committed
132
     <li class="stat"><dl><dt class="inline">{{t}}<//dt><dd class="inline"><strong>{{n}}<//strong><//dd><//dl><//li>
Okhin's avatar
Okhin committed
133
   {% endfor %}
Okhin's avatar
Okhin committed
134
   <//ul>
Okhin's avatar
Okhin committed
135

Okhin's avatar
Okhin committed
136
   <h2 id="featured-title">{% trans "Featured Cases" %}<//h2>
Okhin's avatar
Okhin committed
137
138
139
  <table id="featured_cases">
    <thead>
      <tr>
Okhin's avatar
Okhin committed
140
141
142
143
144
        <th style="width: 70%;">{% trans "Infringing offering" %}<//th>
        <th>{% trans "Confirmed" %}<//th>
        <th><//th>
      <//tr>
    <//thead>
Okhin's avatar
Okhin committed
145
146
147
  <tbody>
  {% for violation in violations %}
    <tr>
Okhin's avatar
Okhin committed
148
       <td><a href="{{ violation.get_absolute_url }}">{{ violation.operator }} ({{ violation.country|country }}) {{ violation.contract }}<//a>
Okhin's avatar
Okhin committed
149
150
          <div class="info-validate">
            <form method="get" id="{{ violation.pk }}" class="confirm_form" >
Okhin's avatar
Okhin committed
151
152
153
154
155
156
157
158
159
160
161
162
                <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>
Okhin's avatar
Okhin committed
163
164
165
    <tr>
       <td colspan="3">
          <div id="description" class='round-box'>
Okhin's avatar
Okhin committed
166
             <strong>{% trans "Affected Resource" %}:<//strong> {{violation.resource_name}}
Okhin's avatar
Okhin committed
167
            {%for c in violation.comment_set.all%}
Okhin's avatar
Okhin committed
168
169
170
            <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>
Okhin's avatar
Okhin committed
171
            {%endfor%}
Okhin's avatar
Okhin committed
172
173
174
          <//div>
       <//td>
    <//tr>
Okhin's avatar
Okhin committed
175
    {% endfor %}
Okhin's avatar
Okhin committed
176
177
178
179
  <//tbody>
<//table>
<//div>
<//div>
Okhin's avatar
Okhin committed
180
{%endblock%}