Make admin links link to current task or tool
This commit is contained in:
parent
192848fb43
commit
71074e6f1b
@ -5,6 +5,8 @@
|
||||
|
||||
{% block title %} {{ tool.name }} - {{ task.name }} | {{ block.super }} {% endblock %}
|
||||
|
||||
{% block admin_link %}{% url 'admin:tasks_task_change' task.id %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
{% block title %} {{ tool }} | {{ block.super }} {% endblock %}
|
||||
|
||||
{% block admin_link %}{% url 'admin:tasks_tool_change' tool.id %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
|
@ -20,7 +20,7 @@
|
||||
<div id="user-nav" class="collapse navbar-collapse justify-content-end">
|
||||
<div class="navbar-nav">
|
||||
{% if user.is_staff %}
|
||||
<a class="nav-item nav-link" href="/admin"> Admin </a>
|
||||
<a class="nav-item nav-link" href="{% block admin_link %}/admin{% endblock %}"> Admin </a>
|
||||
{% endif %}
|
||||
{% if user.is_authenticated %}
|
||||
<a class="nav-item nav-link" href="/auth/logout"> Logout: {{ user }} </a>
|
||||
|
Loading…
Reference in New Issue
Block a user