diff mbox

Add shortcut to admin panel

Message ID 1351141723.2010.55.camel@pico.ipa.ssimo.org
State Accepted
Headers show

Commit Message

Simo Sorce Oct. 25, 2012, 5:08 a.m. UTC
This patch adds a shortcut to the admin panel but only for users that
are members of staff.

Simo.
diff mbox

Patch

From 61b060c49471448a5c5b49ef495d552476a093d4 Mon Sep 17 00:00:00 2001
From: Simo Sorce <idra@samba.org>
Date: Thu, 25 Oct 2012 01:00:43 -0400
Subject: [PATCH] Add quick link to admin panel if a user is a member of the
 staff

Signed-off-by: Simo Sorce <idra@samba.org>
---
 templates/base.html | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/templates/base.html b/templates/base.html
index d3b8e67..787433f 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -26,6 +26,9 @@ 
      <a href="{% url patchwork.views.bundle.bundles %}">bundles</a>
      <br/>
      <a href="{% url patchwork.views.user.profile %}">profile</a> ::
+{% if user.is_staff %}
+     <a href="{% url admin:index %}">admin</a> ::
+{% endif %}
      <a href="{% url auth_logout %}">logout</a>
 {% else %}
      <a href="{% url auth_login %}">login</a>
-- 
1.7.12.1