add font-awesome link and put account actions in a dropdown
This commit is contained in:
parent
35016faba0
commit
d906b9e497
1 changed files with 14 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
{% load staticfiles i18n %}
|
||||
{% load staticfiles i18n account %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
@ -10,6 +10,7 @@
|
|||
|
||||
<!-- Le styles -->
|
||||
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
|
||||
<link href="{% static 'css/font-awesome.min.css' %}" rel="stylesheet">
|
||||
<style>
|
||||
body {
|
||||
padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
|
||||
|
@ -49,11 +50,20 @@
|
|||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{% if user.is_authenticated %}
|
||||
<li><a href="#">{% trans "My Profile" %}</a></li>
|
||||
{% if user.is_staff %}<li><a href="{% url 'admin:index' %}">{% trans "Admin site" %}</a></li>{% endif %}
|
||||
<li><a href="{% url 'account_logout' %}">{% trans "Logout" %}</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 %}
|
||||
<li><a href="{% url 'account_email' %}">{% trans "Change Email" %}</a></li>
|
||||
<li><a href="{% url 'account_logout' %}">{% 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>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
|
|
Loading…
Reference in a new issue