diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2014-10-03 00:55:28 +0100 |
---|---|---|
committer | Stephen Finucane <stephen.finucane@intel.com> | 2015-11-05 03:51:40 +0000 |
commit | 9b9cd68bcfffae3a5ff9db78572af0caa530d4a5 (patch) | |
tree | 391b5bce43ef2d37d0f4b418684c11375a774de0 /templates/base.html | |
parent | 9b472c08eef62db070238914ee69817874f60524 (diff) | |
download | patchwork-9b9cd68bcfffae3a5ff9db78572af0caa530d4a5.tar patchwork-9b9cd68bcfffae3a5ff9db78572af0caa530d4a5.tar.gz |
base: Group username/profile/logout with a dropdown
We regoup user related information (log out and profile) in a dropdown
with the user identity as label.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
Diffstat (limited to 'templates/base.html')
-rw-r--r-- | templates/base.html | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/templates/base.html b/templates/base.html index aa7c2b3..5e82ede 100644 --- a/templates/base.html +++ b/templates/base.html @@ -45,16 +45,21 @@ <li><p class="navbar-text">|</p></li> {% endif %} {% if user.is_authenticated %} - <li><p class="navbar-text">Logged in as <a href="{% url 'patchwork.views.user.profile' %}" - ><strong>{{ user.username }}</strong></a></p></li> <li><a href="{% url 'patchwork.views.user.todo_lists' %}">todo ({{ user.profile.n_todo_patches }})</a></li> <li><a href="{% url 'patchwork.views.bundle.bundles' %}">bundles</a></li> - <li><a href="{% url 'patchwork.views.user.profile' %}">profile</a></li> {% if user.is_staff %} <li><a href="{% url 'admin:index' %}">admin</a></li> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown" + ><strong>{{ user.username }}</strong> <span + class="caret" /></a> + <ul class="dropdown-menu" role="menu"> + <li><a href="{% url 'patchwork.views.user.profile' %}">view profile</a></li> + <li><a href="{% url 'auth_logout' %}">logout</a></li> + </ul> + </li> {% endif %} - <li><a href="{% url 'auth_logout' %}">logout</a></li> {% else %} <li><a href="{% url 'auth_login' %}">login</a></li> <li><a href="{% url 'patchwork.views.user.register' %}">register</a></li> |