aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ctrack/caf/templates/caf/applicablesystem_list.html2
-rw-r--r--ctrack/caf/templates/caf/caf_detail.html71
-rw-r--r--ctrack/caf/urls.py5
-rw-r--r--ctrack/caf/views.py10
-rw-r--r--ctrack/organisations/views.py2
5 files changed, 81 insertions, 9 deletions
diff --git a/ctrack/caf/templates/caf/applicablesystem_list.html b/ctrack/caf/templates/caf/applicablesystem_list.html
index 985960a..c9b07d0 100644
--- a/ctrack/caf/templates/caf/applicablesystem_list.html
+++ b/ctrack/caf/templates/caf/applicablesystem_list.html
@@ -28,7 +28,7 @@
<tr>
<td><a href="{% url "organisations:detail" slug=sys.organisation.slug %}">{{ sys.organisation.name }}</a></td>
<td>{{ sys.name }}</td>
- <td>{{ sys.caf }}</td>
+ <td><a href="{% url "caf:detail" pk=sys.caf.id %}">{{ sys.caf }}</a></td>
<td>{{ sys.organisation.submode.descriptor }}</td>
<td class="tabaligncenter">{{ sys.caf.confidence_grading.descriptor }}</td>
<td>{{ sys.caf.triage_review_date }}</td>
diff --git a/ctrack/caf/templates/caf/caf_detail.html b/ctrack/caf/templates/caf/caf_detail.html
new file mode 100644
index 0000000..f44164a
--- /dev/null
+++ b/ctrack/caf/templates/caf/caf_detail.html
@@ -0,0 +1,71 @@
+{% extends "base.html" %}
+
+{% load static %}
+
+{% block title %}CAF Detail{% endblock %}
+{% block content %}
+ <div class="container">
+
+ <div class="row">
+ <h2>{{ object }}</h2>
+ </div>
+
+ <div class="row pt-3 text-info">
+ <h4>Quality Grading</h4>
+ </div>
+
+ <div class="row pl-3 pt-2 border rounded bg-light">
+ <p>{{ object.quality_grading }}</p>
+ </div>
+
+ <div class="row pt-3 text-info">
+ <h4>Confidence Grading</h4>
+ </div>
+
+ <div class="row pl-3 pt-2 border rounded bg-light">
+ <p>{{ object.confidence_grading }}</p>
+ </div>
+
+ <div class="row pt-3 text-info">
+ <h4>Current Version</h4>
+ </div>
+
+ <div class="row pl-3 pt-2 border rounded bg-light">
+ <p>{{ object.version }}</p>
+ </div>
+
+ <div class="row pt-3 text-info">
+ <h4>File (location?)</h4>
+ </div>
+
+ <div class="row pl-3 pt-2 border rounded bg-light">
+ <p>{{ object.file }}</p>
+ </div>
+
+ <div class="row pt-3 text-info">
+ <h4>Triage Review Date</h4>
+ </div>
+
+ <div class="row pl-3 pt-2 border rounded bg-light">
+ <p>{{ object.triage_review_date }}</p>
+ </div>
+
+ <div class="row pt-3 text-info">
+ <h4>Triage Review Inspector</h4>
+ </div>
+
+ <div class="row pl-3 pt-2 border rounded bg-light">
+ <p>{{ object.triage_review_inspector }}</p>
+ </div>
+
+ <div class="row pt-3 text-info">
+ <h4>Comments</h4>
+ </div>
+
+ <div class="row pl-3 pt-2 border rounded bg-light">
+ <p>{{ object.comments }}</p>
+ </div>
+{% endblock %}
+
+
+
diff --git a/ctrack/caf/urls.py b/ctrack/caf/urls.py
index 37fb96b..3016013 100644
--- a/ctrack/caf/urls.py
+++ b/ctrack/caf/urls.py
@@ -1,11 +1,12 @@
from django.urls import path
-from ctrack.caf.views import CreateCAF, ListCAF, ListApplicableSystem
+from ctrack.caf.views import CreateCAF, ListCAF, ListApplicableSystem, DetailCAF
app_name = "caf"
urlpatterns = [
path("", view=CreateCAF.as_view(), name="create"),
path("", view=ListCAF.as_view(), name="caf_list"),
- path("applicablesystems", view=ListApplicableSystem.as_view(), name="es_list")
+ path("applicablesystems", view=ListApplicableSystem.as_view(), name="es_list"),
+ path("<int:pk>", DetailCAF.as_view(), name="detail")
]
diff --git a/ctrack/caf/views.py b/ctrack/caf/views.py
index 5ded2dc..e4503e7 100644
--- a/ctrack/caf/views.py
+++ b/ctrack/caf/views.py
@@ -1,7 +1,7 @@
-from django.views.generic import CreateView, ListView
+from django.views.generic import CreateView, ListView, DetailView
from ctrack.caf.forms import CAFForm
-from ctrack.caf.models import ApplicableSystem
+from ctrack.caf.models import ApplicableSystem, CAF
class CreateCAF(CreateView):
@@ -18,6 +18,10 @@ class ListCAF(ListView):
pass
+class DetailCAF(DetailView):
+ model = CAF
+
+
class ListApplicableSystem(ListView):
model = ApplicableSystem
# apparently you can pass a list of model objects to a template if you name it
@@ -31,5 +35,3 @@ class ListApplicableSystem(ListView):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
return context
-
-
diff --git a/ctrack/organisations/views.py b/ctrack/organisations/views.py
index 361fcf2..f3957e7 100644
--- a/ctrack/organisations/views.py
+++ b/ctrack/organisations/views.py
@@ -1,8 +1,6 @@
from typing import Any
from django.contrib.auth.mixins import LoginRequiredMixin
-#from django.http import HttpRequest
-#from django.http import HttpResponse
from django.views.generic import DetailView
from typing import Dict