Commit bd0a659d authored by Okhin's avatar Okhin

Patching the navbar

parent d05a38ed
......@@ -58,7 +58,9 @@
<li role="presentation" {% block active_tab_about %}{% endblock %}><a href="{%root_url%}/about">{% trans "What is Net Neutrality?" %}</a></li>
<li role="presentation" {% block active_tab_start %}{% endblock %}><a href="{%root_url%}/start">{% trans "Start Monitoring" %}</a></li>
{% if user.is_authenticated %}
<p class="navbar-text">{{ user.username }}</p>
<li>
<p class="navbar-text">{{ user.username }}</p>
</li>
<li role="presentation" class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" href="#">{% trans "Admin Action" %} <span class="caret"></span></a>
<ul class="dropdown-menu">
......@@ -71,33 +73,36 @@
{% else %}
<li role="presentation"><a href="{%root_url%}/admin/" id="login">{% trans "Login" %}</a></li>
{% endif %}
<li>
<form action="{% url 'set_language' %}" method="post" class="navbar-form">{% csrf_token %}
<div class="input-group">
<select class="form-control" name="language">
{% get_current_language as LANGUAGE_CODE %}
{% get_available_languages as LANGUAGES %}
{% get_language_info_list for LANGUAGES as languages %}
{% for language in languages %}
<option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected="selected"{% endif %}>
{{ language.name_local }} ({{ language.code }})
</option>
{% endfor %}
</select>
<span class="input-group-btn">
<button type="submit" class="btn btn-default">Go</button>
</span>
</div>
</form>
</li>
<li>
<form action="/search/" method="get" class="navbar-form">
<div class="input-group">
<input type="text" class="form-control" placeholder="Quick Search...">
<span class="input-group-btn">
<button type="submit" class="btn btn-default">Search</button>
</span>
</div>
</form>
</li>
</ul>
<form action="{% url 'set_language' %}" method="post" class="navbar-form">{% csrf_token %}
<div class="input-group">
<select class="form-control" name="language">
{% get_current_language as LANGUAGE_CODE %}
{% get_available_languages as LANGUAGES %}
{% get_language_info_list for LANGUAGES as languages %}
{% for language in languages %}
<option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected="selected"{% endif %}>
{{ language.name_local }} ({{ language.code }})
</option>
{% endfor %}
</select>
<span class="input-group-btn">
<button type="submit" class="btn btn-default">Go</button>
</span>
</div>
</form>
<form action="/search/" method="get" class="navbar-form navbar-right">
<div class="input-group">
<input type="text" class="form-control" placeholder="Quick Search...">
<span class="input-group-btn">
<button type="submit" class="btn btn-default">Search</button>
</span>
</div>
</form>
</div>
</div>
</nav>
......
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