From 6d0f2a73959e9565c61c442eba5fa00fea088eaa Mon Sep 17 00:00:00 2001 From: bkfox Date: Fri, 29 Mar 2024 05:02:43 +0100 Subject: [PATCH] add dashboard nav --- aircox/templates/aircox/base.html | 14 +++-------- aircox/templates/aircox/dashboard/nav.html | 27 ++++++++++++++++++++++ 2 files changed, 30 insertions(+), 11 deletions(-) create mode 100644 aircox/templates/aircox/dashboard/nav.html diff --git a/aircox/templates/aircox/base.html b/aircox/templates/aircox/base.html index 8c3c02a..5e42e48 100644 --- a/aircox/templates/aircox/base.html +++ b/aircox/templates/aircox/base.html @@ -62,18 +62,10 @@ Usefull context: {% for item, render in items %} {{ render }} {% endfor %} - {% if user.is_staff %} - - {% translate "Admin" %} - - {% endif %} - {% if user.is_authenticated %} - - - - {% endif %} {% endblock %} + {% if user.is_authenticated %} + {% include "./dashboard/nav.html" %} + {% endif %} {% endblock %} diff --git a/aircox/templates/aircox/dashboard/nav.html b/aircox/templates/aircox/dashboard/nav.html new file mode 100644 index 0000000..82ffd71 --- /dev/null +++ b/aircox/templates/aircox/dashboard/nav.html @@ -0,0 +1,27 @@ +{% load i18n %} +