diff options
-rw-r--r-- | ctrack/caf/templates/caf/caf_list.html | 4 | ||||
-rw-r--r-- | ctrack/caf/views.py | 23 |
2 files changed, 4 insertions, 23 deletions
diff --git a/ctrack/caf/templates/caf/caf_list.html b/ctrack/caf/templates/caf/caf_list.html index d82a709..437f083 100644 --- a/ctrack/caf/templates/caf/caf_list.html +++ b/ctrack/caf/templates/caf/caf_list.html @@ -17,7 +17,7 @@ <thead> <tr> <th>Organisation</th> - <th>Link</th> + <th>CAF</th> <th>Sub Mode</th> <th>Applicable Systems</th> </tr> @@ -26,7 +26,7 @@ <tr> <td><a href="{% url "organisations:detail" slug=caf.organisation.slug %}">{{ caf.organisation }}</a> </td> - <td><a href="{% url 'caf:detail' pk=caf.pk %}">{{ caf.version }}</a></td> + <td><a href="{% url 'caf:detail' pk=caf.pk %}">{{ caf }}</a></td> <td>{{ caf.sub_mode }}</td> <td> <ul> diff --git a/ctrack/caf/views.py b/ctrack/caf/views.py index 14a2edb..6cf3945 100644 --- a/ctrack/caf/views.py +++ b/ctrack/caf/views.py @@ -31,32 +31,13 @@ def caf_detail_view(request, pk): for ass in assessments: lst_scores = [ass, CAFAssessmentOutcomeScore.objects.filter(caf_assessment=ass)] _scrs.append(lst_scores) - events_related_to_caf = caf.get_events() - single_date_events = [] - twin_date_events = [] - for event in events_related_to_caf: - if event.type.single_date_type: - single_date_events.append(event) - else: - twin_date_events.append(event) - if single_date_events: - sde = True - else: - sde = False - - if twin_date_events: - tde = True - else: - tde = False context = { "object": caf, "assessments_and_scores": _scrs, "organisation": caf.organisation, "systems": caf.systems.all(), - "single_date_events": single_date_events, - "sde": sde, - "tde": tde, - "twin_date_events": twin_date_events + "single_date_events": caf.cafsingledateevent_set.all(), + "twin_date_events": caf.caftwindateevent_set.all(), } return render(request, "caf/caf_detail.html", context) |