summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2014-10-03 00:55:28 +0100
committerStephen Finucane <stephen.finucane@intel.com>2015-11-05 03:51:40 +0000
commit9b9cd68bcfffae3a5ff9db78572af0caa530d4a5 (patch)
tree391b5bce43ef2d37d0f4b418684c11375a774de0 /templates
parent9b472c08eef62db070238914ee69817874f60524 (diff)
downloadpatchwork-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')
-rw-r--r--templates/base.html13
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>&nbsp;<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>