add font-awesome link and put account actions in a dropdown

This commit is contained in:
Jan Dittberner 2015-01-17 21:42:13 +01:00
parent 35016faba0
commit d906b9e497

View file

@ -1,4 +1,4 @@
{% load staticfiles i18n %} {% load staticfiles i18n account %}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
@ -10,6 +10,7 @@
<!-- Le styles --> <!-- Le styles -->
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet"> <link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
<link href="{% static 'css/font-awesome.min.css' %}" rel="stylesheet">
<style> <style>
body { body {
padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */ padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
@ -49,11 +50,20 @@
</ul> </ul>
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
{% if user.is_authenticated %} {% if user.is_authenticated %}
<li><a href="#">{% trans "My Profile" %}</a></li> {% user_display user as user_display %}
{% url 'user_profile' slug=user.username as profile_url %}
<p class="navbar-text">{% blocktrans %}Signed in as <a href="{{ profile_url }}" class="navbar-link" title="My Profile">{{ user_display }}</a>{% endblocktrans %}</p>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">{% 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 %} {% 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 'account_logout' %}">{% trans "Logout" %}</a></li> <li><a href="{% url 'account_logout' %}">{% trans "Logout" %}</a></li>
</ul>
</li>
{% else %} {% else %}
<li><a href="{% url 'account_login' %}?next={{ request.path }}">{% trans "Sign In" %}</a></li> <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>
{% endif %} {% endif %}
</ul> </ul>
</div><!--/.nav-collapse --> </div><!--/.nav-collapse -->