From d70af262eaee4bf4d09d384dc0ce59ec2d85758c Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Thu, 19 Oct 2017 12:17:56 -0400 Subject: Updated the NAV, hide other options from regular users. --- app/dispatch/templates/dispatch/nav.html | 10 ++++++++++ app/dispatch/templatetags/custom_tags.py | 7 +++++++ 2 files changed, 17 insertions(+) create mode 100644 app/dispatch/templates/dispatch/nav.html create mode 100644 app/dispatch/templatetags/custom_tags.py (limited to 'app') diff --git a/app/dispatch/templates/dispatch/nav.html b/app/dispatch/templates/dispatch/nav.html new file mode 100644 index 0000000..5ba40d9 --- /dev/null +++ b/app/dispatch/templates/dispatch/nav.html @@ -0,0 +1,10 @@ +{% if user.is_authenticated %} +
  • Loads
  • + {% if user.is_superuser %} +
  • Drivers
  • +
  • Companies
  • + {% endif %} +
  • Logout
  • +{% else %} +
  • Login
  • +{% endif %} diff --git a/app/dispatch/templatetags/custom_tags.py b/app/dispatch/templatetags/custom_tags.py new file mode 100644 index 0000000..e242551 --- /dev/null +++ b/app/dispatch/templatetags/custom_tags.py @@ -0,0 +1,7 @@ +from django import template + +register = template.Library() + +@register.simple_tag +def listForCommaString(string): + return string.split(',') -- cgit v1.2.3