Commit 8fbc104c authored by Olivier Girardot's avatar Olivier Girardot

refactored tab handling to not depend on any url hardcoded path

parent 409e53f1
{% extends "base.html" %} {% extends "base.html" %}
{% load bt %} {% load bt %}
{% load i18n %} {% load i18n %}
{% block active_tab_contact %}id="current"{% endblock %}
{% block content %} {% block content %}
<div id='global'> <div id='global'>
<p>{% trans "RespectMyNet.eu is an online platform enabling citizens to become the watchmen of the Internet by reporting Net Neutrality violations. Everyone is invited to report undue blocking or throttling of their Internet access, and help name and shame operators' harmful practices." %}</p> <p>{% trans "RespectMyNet.eu is an online platform enabling citizens to become the watchmen of the Internet by reporting Net Neutrality violations. Everyone is invited to report undue blocking or throttling of their Internet access, and help name and shame operators' harmful practices." %}</p>
......
...@@ -37,11 +37,11 @@ ...@@ -37,11 +37,11 @@
</p></div> </p></div>
<ul id="nav"> <ul id="nav">
<li><a {% if request.path == '/' %}id="current" {% endif %}href="{% url homepage %}">{% trans "Home" %}</a></li> <li><a {% block active_tab_home %}{% endblock %} href="{% url homepage %}">{% trans "Home" %}</a></li>
<li><a {% if request.path == '/list/' or '/view' in request.path %}id="current" {% endif %}href="{% url list_violations %}">{% trans "Cases" %}</a></li> <li><a {% block active_tab_cases %}{% endblock %} href="{% url list_violations %}">{% trans "Cases" %}</a></li>
<li><a {% if request.path == '/about/' %}id="current" {% endif %}href="{%root_url%}/about">{% trans "What is Net Neutrality?" %}</a></li> <li><a {% block active_tab_about %}{% endblock %} href="{%root_url%}/about">{% trans "What is Net Neutrality?" %}</a></li>
<li><a {% if request.path == '/start/' %}id="current" {% endif %}href="{%root_url%}/start">{% trans "Start Monitoring" %}</a></li> <li><a {% block active_tab_start %}{% endblock %} href="{%root_url%}/start">{% trans "Start Monitoring" %}</a></li>
<li><a {% if request.path == '/contact/' %}id="current" {% endif %}href="{%root_url%}/contact">{% trans "Contact" %}</a></li> <li><a {% block active_tab_contact %}{% endblock %} href="{%root_url%}/contact">{% trans "Contact" %}</a></li>
</ul></div> </ul></div>
</div> </div>
</div> </div>
......
{% extends "base.html" %} {% extends "base.html" %}
{% load bt %} {% load bt %}
{% load i18n %} {% load i18n %}
{% block active_tab_home %}id="current"{% endblock %}
{% block styles %} {% block styles %}
<link rel="stylesheet" type="text/css" media="all" href="{% media_url %}/css/jquery.autocomplete.css" /> <link rel="stylesheet" type="text/css" media="all" href="{% media_url %}/css/jquery.autocomplete.css" />
{% endblock %} {% endblock %}
......
{% extends "base.html" %} {% extends "base.html" %}
{% load bt %} {% load bt %}
{% load i18n %} {% load i18n %}
{% block active_tab_cases %}id="current"{% endblock %}
{% block styles %} {% block styles %}
<link rel="stylesheet" href="{{ MEDIA_URL }}/css/map.css" type="text/css" /> <link rel="stylesheet" href="{{ MEDIA_URL }}/css/map.css" type="text/css" />
{% endblock %} {% endblock %}
......
{% extends "base.html" %} {% extends "base.html" %}
{% load bt %} {% load bt %}
{% load i18n %} {% load i18n %}
{% block active_tab_about %}id="current"{% endblock %}
{% block content %} {% block content %}
<div id='global'> <div id='global'>
<h3>{% trans "On the Internet, <strong>you</strong> decide what you do, right? <em>Not anymore!</em>" %}</h3> <h3>{% trans "On the Internet, <strong>you</strong> decide what you do, right? <em>Not anymore!</em>" %}</h3>
......
{% extends "base.html" %} {% extends "base.html" %}
{% load bt %} {% load bt %}
{% load i18n %} {% load i18n %}
{% block active_tab_start %}id="current"{% endblock %}
{% block content %} {% block content %}
<div id='global'> <div id='global'>
<p>{% trans "Do you want to check whether your access provider is manipulating your internet traffic? Great!" %}</p> <p>{% trans "Do you want to check whether your access provider is manipulating your internet traffic? Great!" %}</p>
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
{% load bt %} {% load bt %}
{% load i18n %} {% load i18n %}
{% load comments %} {% load comments %}
{% block active_tab_cases %}id="current"{% endblock %}
{% block styles %} {% block styles %}
{% endblock %} {% endblock %}
{% block adminext %} {% block adminext %}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment