diff options
-rw-r--r-- | ctrack/caf/templates/caf/applicablesystem_detail.html | 43 | ||||
-rw-r--r-- | ctrack/organisations/templates/organisations/essential_service_detail.html | 25 | ||||
-rw-r--r-- | ctrack/organisations/views.py | 6 |
3 files changed, 46 insertions, 28 deletions
diff --git a/ctrack/caf/templates/caf/applicablesystem_detail.html b/ctrack/caf/templates/caf/applicablesystem_detail.html index fa1d414..6aae323 100644 --- a/ctrack/caf/templates/caf/applicablesystem_detail.html +++ b/ctrack/caf/templates/caf/applicablesystem_detail.html @@ -5,31 +5,32 @@ {% block title %}{{ object.name }}{% endblock %} {% block content %} - <div class="container mt-3"> - <div class="row"> - <div class="col-sm-12 pl-0 my-2"> - <div class="row"> - <h4>{{ object.name }}</h4> - </div> - <div class="row"> - <h5>{{ object.caf.organisation }}</h5> - </div> - <div class="row"> - <h5>Function</h5> - </div> - <div class="row"> - <p>{{ object.function }}</p> +<div class="container mt-3"> + <div class="row"> + <div class="col-sm-6 pl-0 my-2"> + <div class="row"> + <h4>{{ object.name }}</h4> + </div> + <div class="row"> + <h5>{{ object.caf.organisation }}</h5> + </div> + <div class="row"> + <h5>Function</h5> + </div> + <div class="row"> + <p>{{ object.function }}</p> + </div> + <div class="row"> + <div class="col-sm-6 pl-0 my-2"> <p>Supports Essential Services:</p> - </div> - <div class="row"> - <ul> - {% for s in object.essentialservice_set.all %} - <li><a href="{% url "organisations:essential_service_detail" s.pk %}">{{ s.name }}</a></li> - {% endfor %} + <ul class="list-group list-group-flush"> + {% for s in object.essentialservice_set.all %} + <li class="list-group-item"><a href="{% url "organisations:essential_service_detail" s.pk %}">{{ s.name }}</a></li> + {% endfor %} </ul> </div> </div> </div> </div> - +</div> {% endblock %} 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) |