aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/caf
diff options
context:
space:
mode:
authorMR Lemon <matt@matthewlemon>2020-04-16 17:16:00 +0100
committerMR Lemon <matt@matthewlemon>2020-04-16 17:16:00 +0100
commita78bb6bd4ccd96bbdb153cf9fc1b83632ccaa276 (patch)
tree99d81f3906d7710072d3a64e054e49753b360ee9 /ctrack/caf
parent537370e45631a7fa35ac855e746771ce6ca9224a (diff)
layout of CAF list
Diffstat (limited to 'ctrack/caf')
-rw-r--r--ctrack/caf/models.py5
-rw-r--r--ctrack/caf/templates/caf/caf_list.html28
2 files changed, 32 insertions, 1 deletions
diff --git a/ctrack/caf/models.py b/ctrack/caf/models.py
index 5d7b5b0..0151d4b 100644
--- a/ctrack/caf/models.py
+++ b/ctrack/caf/models.py
@@ -92,7 +92,10 @@ class CAF(models.Model):
def organisation(self):
first_ass = ApplicableSystem.objects.filter(caf=self).first()
return first_ass.organisation
-
+
+ def sub_mode(self):
+ return self.organisation().submode
+
def __str__(self):
# Get the organisation and applicable system
ass = ApplicableSystem.objects.filter(caf=self).first()
diff --git a/ctrack/caf/templates/caf/caf_list.html b/ctrack/caf/templates/caf/caf_list.html
new file mode 100644
index 0000000..f14b34f
--- /dev/null
+++ b/ctrack/caf/templates/caf/caf_list.html
@@ -0,0 +1,28 @@
+{% extends "base.html" %}
+
+{% load static %}
+
+{% block title %} CAFs {% endblock %}
+{% block content %}
+
+ <div class="container">
+ <div class="row">
+ <h2>CAFs in system</h2>
+ </div>
+
+ {% for caf in object_list %}
+ <div class="row">
+ <div class="col-sm-12">
+ <div class="card">
+ <div class="card-body">
+ <h5 class="card-title">{{ caf.organisation.name }}_{{ caf.version }} | {{ caf.sub_mode }}</h5>
+ <p class="card-text">Bobbins text here</p>
+ <a href="#" class="btn btn-primary">Go somewhere</a>
+ </div>
+ </div>
+ </div>
+ </div>
+ {% endfor %}
+ </div>
+
+{% endblock %}