diff options
| author | Mitch Riedstra <Mitch@riedstra.us> | 2017-10-19 12:17:56 -0400 |
|---|---|---|
| committer | Mitch Riedstra <Mitch@riedstra.us> | 2017-10-19 12:17:56 -0400 |
| commit | d70af262eaee4bf4d09d384dc0ce59ec2d85758c (patch) | |
| tree | 199005b959f165f3cd00a50df4f7c3e5ece1e792 /app | |
| parent | 3b1f51020915c6d0c2f1d2c15aab0a092b8c9462 (diff) | |
| download | dispatch-tracker-d70af262eaee4bf4d09d384dc0ce59ec2d85758c.tar.gz dispatch-tracker-d70af262eaee4bf4d09d384dc0ce59ec2d85758c.tar.xz | |
Updated the NAV, hide other options from regular users.
Diffstat (limited to 'app')
| -rw-r--r-- | app/dispatch/templates/dispatch/nav.html | 10 | ||||
| -rw-r--r-- | app/dispatch/templatetags/custom_tags.py | 7 |
2 files changed, 17 insertions, 0 deletions
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 %} + <li><a href="{% url 'load_list' %}">Loads</a></li> + {% if user.is_superuser %} + <li><a href="{% url 'driver_list' %}">Drivers</a></li> + <li><a href="{% url 'company_list' %}">Companies</a></li> + {% endif %} + <li><a href="{% url 'logout' %}">Logout</a></li> +{% else %} + <li><a href="{% url 'login' %}">Login</a></li> +{% 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(',') |
