diff --git a/atdb/taskdatabase/templates/tables2/base.html b/atdb/taskdatabase/templates/tables2/base.html index 0b17f1fc54ab6675cbfb0cedd5aab5f6f5aec67b..6edc87dce1a380664fe2da9aa3ed75554e4c8759 100644 --- a/atdb/taskdatabase/templates/tables2/base.html +++ b/atdb/taskdatabase/templates/tables2/base.html @@ -36,14 +36,20 @@ <!-- Header --> <li><a class="navbar-brand" href="{% url 'homepage' %}"> <img src="{% static 'taskdatabase/ldvlogo_small.png' %}" height="30" alt=""> - ATDB-LDV</a> + ATDB-LDV Dashboard</a> </li> <li><a class="nav-link" href="{% url 'homepage' %}">Tasks</a></li> + <li><a class="nav-link" href="{% url 'task-details' 0 0 %}">Details</a></li> <li><a class="nav-link" href="{% url 'tables2' %}">Query</a></li> <li><a class="nav-link" href="{% url 'diagram' %}">State Diagram</a></li> - <li><a class="nav-link" href="{% url 'admin:index' %}">Admin</a></li> + {% if user.is_staff %} + <li><a class="nav-link" href="{% url 'admin:index' %}" target="_blank">Admin Page</a></li> + {% endif %} + </ul> + User: {{ user.get_username }} </div> + {% include 'taskdatabase/filter/search.html' %} </nav> diff --git a/atdb/taskdatabase/templates/tables2/index.html b/atdb/taskdatabase/templates/tables2/index.html index 7d27fdc5b11ce9a551b6b43741acf3ec3548e927..cc2e83399504945fe35c043ca80c6f1c6fae06a0 100644 --- a/atdb/taskdatabase/templates/tables2/index.html +++ b/atdb/taskdatabase/templates/tables2/index.html @@ -1,4 +1,4 @@ -{% extends 'tables2/base.html' %} +{% extends 'taskdatabase/base.html' %} {% load render_table from django_tables2 %} {% load bootstrap3 %} diff --git a/atdb/taskdatabase/views.py b/atdb/taskdatabase/views.py index 6cd5f764117d2967ba7ef82d702771d3d386f3d5..732d6030274ccbdf89a74e772f5400c6b3a06918 100644 --- a/atdb/taskdatabase/views.py +++ b/atdb/taskdatabase/views.py @@ -176,8 +176,8 @@ class DashboardView(ListView): # but if 'context_object_name' is defined, then this returned list is named and can be accessed that way in html. context_object_name = 'my_tasks' -class ChartsView(ListView): +class ChartsView(ListView): template_name = 'dashboard/charts.html' model = Task queryset = Task.objects.all() @@ -185,6 +185,7 @@ class ChartsView(ListView): # but if 'context_object_name' is defined, then this returned list is named and can be accessed that way in html. context_object_name = 'my_tasks' + class TaskTables2View(SingleTableView): model = Task table_class = TaskTable