From d5833c7364060076ed4af460a6f020344ce74f21 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Thu, 5 Sep 2024 15:01:16 +0100 Subject: Improved engagement detail page layout, using htmx --- .../templates/engagements/engagement_detail.html | 219 ++++++++++++++------- .../engagements/snippets/effort_detail.html | 27 +++ 2 files changed, 170 insertions(+), 76 deletions(-) create mode 100644 engagements/templates/engagements/snippets/effort_detail.html (limited to 'engagements/templates') diff --git a/engagements/templates/engagements/engagement_detail.html b/engagements/templates/engagements/engagement_detail.html index c75523b..848b9f6 100644 --- a/engagements/templates/engagements/engagement_detail.html +++ b/engagements/templates/engagements/engagement_detail.html @@ -1,84 +1,96 @@ {% extends "core/base.html" %} {% load table_extras %} +{% load static %} {% block title %}{{ engagement }}{% endblock title %} {% block content %}
-
-
-

{{ engagement.friendly_type }} - at {{ engagement.external_party }}

-
-
- +
-

Details

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Date - {{ engagement.proposed_start_date|date:'l' }} - - {{ engagement.proposed_start_date|date:'j M Y' }} -
Site/Operation{{ engagement.external_party }}
Subject of Activity -

Summary text

- - - - - - - - {% for t in dscs %} - - - - {% endfor %} - -
- DSC -
- {{ t }} -
-
Inspectors{{ engagement.officers.all|commalist }}
Planned Effort{{ effort_planned|floatformat }} hrs
Actual Effort{{ effort_actual|floatformat }} hrs
Total Effort{{ effort_total|floatformat }} hrs
+
+
+
+

{{ engagement.friendly_type }} + at {{ engagement.external_party }}

+
+
+
+
+ +
+ + + + Tuesday - 10 May 2022 +
+ + +
+ + + + + + Smith, Short and Brookes +
+ + +
+ + + + + + DSC 1 - Title 1 +
+ + +
+ + + + + Hilary James, Carly Robinson, Alison Smart +
+ + +
+ + + + + Actual Effort: 5.3 hrs +
+ + + +
+
+
-
-
-

Effort for this engagement

+
+
+

Effort

+ {% endblock content %} diff --git a/engagements/templates/engagements/snippets/effort_detail.html b/engagements/templates/engagements/snippets/effort_detail.html new file mode 100644 index 0000000..16c64b4 --- /dev/null +++ b/engagements/templates/engagements/snippets/effort_detail.html @@ -0,0 +1,27 @@ +
+
+

Effort Details

+ +
+
+

Effort Details

+

Type: {{ effort.effort_type }}

+

Date: {{ effort.proposed_start_date|date:"d M Y" }}

+

Hours: {{ effort.hours }}

+

Notes: {{ effort.notes|default:"No notes available" }}

+ +
+
+ + -- cgit v1.2.3