add icons to top level navigation

This commit is contained in:
Jan Dittberner 2015-02-01 19:39:09 +01:00
parent 52b6dd5845
commit e87e4ca268
2 changed files with 14 additions and 13 deletions

View File

@ -1,6 +1,7 @@
Changelog
=========
* :feature:`-` add icons to top level navigation
* :feature:`-` add contact form
* :feature:`-` add imprint as flatpage
* :support:`-` mark active menu item as active via context_processor and

View File

@ -47,14 +47,14 @@
<ul class="nav navbar-nav">
{% if user.is_staff %}
<li class="dropdown{% if active_item == 'hostingpackage' %} active{% endif %}">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">{% trans "Hosting" %} <span class="caret"></span></a>
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-server"></i> {% trans "Hosting" %} <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="{% url 'hosting_packages' user=user.username %}">{% trans "Your hosting packages" %}</a></li>
<li><a href="{% url 'all_hosting_packages' %}">{% trans "All hosting packages" %}</a></li>
<li><a href="{% url 'hosting_packages' user=user.username %}"><i class="fa fa-cube"></i> {% trans "Your hosting packages" %}</a></li>
<li><a href="{% url 'all_hosting_packages' %}"><i class="fa fa-cubes"></i> {% trans "All hosting packages" %}</a></li>
</ul>
</li>
{% elif user.is_authenticated %}
<li{% if active_item == 'hostingpackage' %} class="active"{% endif %}><a href="{% url 'hosting_packages' user=user.username %}">{% trans "Hosting" %}</a></li>
<li{% if active_item == 'hostingpackage' %} class="active"{% endif %}><a href="{% url 'hosting_packages' user=user.username %}"><i class="fa fa-server"></i> {% trans "Hosting" %}</a></li>
{% endif %}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="glyphicon glyphicon-link"></i> {% trans "Links" %} <span class="caret"></span></a>
@ -64,23 +64,23 @@
<li><a href="{{ phppgadmin_url }}" title="{% trans "phpPgAdmin - PostgreSQL database administration tool" %}"><i class="icon-postgres"></i> {% trans "phpPgAdmin" %}</a></li>
</ul>
</li>
<li{% if active_item == 'imprint' %} class="active"{% endif %}><a href="{% url 'imprint' %}">{% trans "Imprint" %}</a></li>
<li{% if active_item == 'contact' %} class="active"{% endif %}><a href="{% url 'contact_form' %}">{% trans "Contact" %}</a></li>
<li{% if active_item == 'imprint' %} class="active"{% endif %}><a href="{% url 'imprint' %}"><i class="fa fa-info"></i> {% trans "Imprint" %}</a></li>
<li{% if active_item == 'contact' %} class="active"{% endif %}><a href="{% url 'contact_form' %}"><i class="fa fa-paper-plane"></i> {% trans "Contact" %}</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
{% if user.is_authenticated %}
<li class="dropdown{% if active_item == 'account' %} active{% endif %}">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">{% trans "My Account" %} <span class="caret"></span></a>
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-user"></i> {% trans "My Account" %} <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
{% if user.is_staff %}<li><a href="{% url 'admin:index' %}">{% trans "Admin site" %}</a></li>{% endif %}
<li><a href="{% url 'account_email' %}">{% trans "Change Email" %}</a></li>
<li><a href="{% url 'socialaccount_connections' %}">{% trans "Social Accounts" %}</a></li>
<li><a href="{% url 'account_logout' %}">{% trans "Logout" %}</a></li>
{% if user.is_staff %}<li><a href="{% url 'admin:index' %}"><i class="fa fa-wrench"></i> {% trans "Admin site" %}</a></li>{% endif %}
<li><a href="{% url 'account_email' %}"><i class="fa fa-at"></i> {% trans "Change Email" %}</a></li>
<li><a href="{% url 'socialaccount_connections' %}"><i class="fa fa-users"></i> {% trans "Social Accounts" %}</a></li>
<li><a href="{% url 'account_logout' %}"><i class="fa fa-sign-out"></i> {% trans "Logout" %}</a></li>
</ul>
</li>
{% else %}
<li><a href="{% url 'account_login' %}?next={{ request.path }}">{% trans "Sign In" %}</a></li>
<li><a href="{% url 'account_signup' %}">{% trans "Sign Up" %}</a></li>
<li><a href="{% url 'account_login' %}?next={{ request.path }}"><i class="fa fa-sign-in"></i> {% trans "Sign In" %}</a></li>
<li><a href="{% url 'account_signup' %}"><i class="fa fa-user-plus"></i> {% trans "Sign Up" %}</a></li>
{% endif %}
</ul>
{% if user.is_authenticated %}