diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-09-14 15:35:53 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-09-14 15:35:53 +0100 |
commit | 3c6f2c66524f07d7bb482da187f0387e3cf147d3 (patch) | |
tree | c4a3fcf811507960339b5d8fcff0a1aac5875493 /ctrack/organisations | |
parent | 0889c968f015f6525e5fc6f01fdfe2255289d1e3 (diff) |
some html changes
Diffstat (limited to 'ctrack/organisations')
-rw-r--r-- | ctrack/organisations/templates/organisations/essential_service_detail.html | 25 | ||||
-rw-r--r-- | ctrack/organisations/views.py | 6 |
2 files changed, 24 insertions, 7 deletions
diff --git a/ctrack/organisations/templates/organisations/essential_service_detail.html b/ctrack/organisations/templates/organisations/essential_service_detail.html index 1fd17bb..d66c0da 100644 --- a/ctrack/organisations/templates/organisations/essential_service_detail.html +++ b/ctrack/organisations/templates/organisations/essential_service_detail.html @@ -4,30 +4,45 @@ {{ es.name }} {% endblock %} + {% block content %} <div class="container mt-3"> <div class="row"> <div class="col-sm-12 pl-0 my-2"> <div class="row"> <div class="col-12"> - <h4>{{ es.name }}</h4> + <h3>{{ es.name }}</h3> </div> </div> </div> </div> <div class="row"> - <div class="col-sm-12 pl-0 my-2"> + <div class="col-sm-6 pl-0 my-2"> + <h5>Description of Service</h5> + <hr> <p>{{ es.description }}</p> </div> </div> <div class="row"> - <div class="col-sm-12 pl-0 my-2"> - <ul> + <div class="col-sm-6 pl-0 my-2"> + <h5>Systems which support this service</h5> + <ul class="list-group list-group-flush"> {% for ass in asses %} - <li><a href="{% url "caf:ass_detail" ass.pk %}">{{ ass.name }}</a></li> + <li class="list-group-item"><a href="{% url "caf:ass_detail" ass.pk %}">{{ ass.name }}</a></li> {% endfor %} </ul> </div> </div> + <div class="row"> + <div class="col-sm-6 pl-0 my-2"> + <h5>CAFs which apply to this Service</h5> + <ul class="list-group list-group-flush"> + {% for caf in cafs %} + <li class="list-group-item"><a href="{% url "caf:detail" caf.pk %}">{{ caf.version }} | {{ caf.organisation.name }}</a></li> + {% endfor %} + </ul> + </div> + </div> + {% endblock content %} diff --git a/ctrack/organisations/views.py b/ctrack/organisations/views.py index 7171fab..1993c59 100644 --- a/ctrack/organisations/views.py +++ b/ctrack/organisations/views.py @@ -11,14 +11,16 @@ from ctrack.register.models import EngagementEvent from .forms import AddressInlineFormSet, IncidentReportForm, OrganisationCreateForm from .models import IncidentReport, Organisation, Person -from ctrack.caf.models import EssentialService +from ctrack.caf.models import EssentialService, CAF # TODO - needs a permission on this view def essential_service_detail(request, pk): es = EssentialService.objects.get(pk=pk) + org = es.organisation + cafs = CAF.objects.filter(organisation=org.pk) asses = es.systems.all() # es = get_object_or_404(EssentialService, organisation__pk=org_pk) - context = {"es": es, "asses": asses} + context = {"es": es, "asses": asses, "cafs": cafs} return render(request, "organisations/essential_service_detail.html", context) |