From 0f951dcf029d4af284467543a3afdf5bf6581a20 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Tue, 23 Apr 2024 11:16:38 +0100 Subject: switched to Django --- .../templates/engagements/engagement_create.html | 29 ++ .../templates/engagements/engagement_detail.html | 78 ++++ .../engagements/engagement_effort_create.html | 20 + .../templates/engagements/engagement_form.html | 32 ++ .../engagements/engagement_plan_for_site.html | 35 ++ engagements/templates/engagements/ep_org.html | 427 +++++++++++++++++++++ engagements/templates/engagements/index.html | 30 ++ .../templates/engagements/organisations.html | 50 +++ .../engagements/snippets/effort_summary_panel.html | 41 ++ 9 files changed, 742 insertions(+) create mode 100644 engagements/templates/engagements/engagement_create.html create mode 100644 engagements/templates/engagements/engagement_detail.html create mode 100644 engagements/templates/engagements/engagement_effort_create.html create mode 100644 engagements/templates/engagements/engagement_form.html create mode 100644 engagements/templates/engagements/engagement_plan_for_site.html create mode 100644 engagements/templates/engagements/ep_org.html create mode 100644 engagements/templates/engagements/index.html create mode 100644 engagements/templates/engagements/organisations.html create mode 100644 engagements/templates/engagements/snippets/effort_summary_panel.html (limited to 'engagements/templates') diff --git a/engagements/templates/engagements/engagement_create.html b/engagements/templates/engagements/engagement_create.html new file mode 100644 index 0000000..1e72ca0 --- /dev/null +++ b/engagements/templates/engagements/engagement_create.html @@ -0,0 +1,29 @@ +{% extends "core/base.html" %} + +{% block title %}Create new engagement{% endblock title %} + +{% block content %} + +
+

{{ title }}

+
+ + × +

Step 1

+

To roughly plan out future events, you provide the minimal details here: start date, end date (optional),the type of Engagement (Assessment, Inspection or Sampling), the external site or operation and finally the inspectors who are carrying out the work.

+

Step 2

+

So that we can track the finer details involved with an Assessment or Inspection, each Engagement comprises additional components, such as Planning, On-site and Reporting. Inspector time can be allocated to these components. In addition, each compontent can be associated with Instruments, such as DSCs, etc. After you create the overarching Engagement using this form, you will have the opportunity to add components.

+
+ +
+
+

Enter main details:

+
{% csrf_token %} + {{ form.as_p }} + +
+
+
+ +{% endblock content %} diff --git a/engagements/templates/engagements/engagement_detail.html b/engagements/templates/engagements/engagement_detail.html new file mode 100644 index 0000000..85ef220 --- /dev/null +++ b/engagements/templates/engagements/engagement_detail.html @@ -0,0 +1,78 @@ +{% extends "core/base.html" %} +{% load table_extras %} + +{% block title %}{{ engagement }}{% endblock title %} + +{% block content %} + +
+
+

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

+
+
+
+
+ Edit Engagement +
+
+

Details

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

Summmary text

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

Effort for this engagement

+ Add: + Travel | + Planning | + Regulation | + Reporting + + {% if effort %} + {% for e in effort.all %} +
+ {% include "engagements/snippets/effort_summary_panel.html" with e=e %} +
+ {% endfor %} + {% endif %} +
+
+ + {% endblock content %} diff --git a/engagements/templates/engagements/engagement_effort_create.html b/engagements/templates/engagements/engagement_effort_create.html new file mode 100644 index 0000000..65e2e21 --- /dev/null +++ b/engagements/templates/engagements/engagement_effort_create.html @@ -0,0 +1,20 @@ +{% extends "core/base.html" %} + +{% load crispy_forms_tags %} + +{% block title %}Add {{ etype }} effort to Engagement{% endblock title %} + +{% block content %} + +
+

Register your {{ etype|lower }} effort for the {{ engagement.engagement_type.name|title }} event at {{ engagement.external_party }} on {{ engagement.proposed_start_date }}

+ +
+

Enter details:

+
{% csrf_token %} + {% crispy form form.helper %} +
+
+
+ +{% endblock content %} diff --git a/engagements/templates/engagements/engagement_form.html b/engagements/templates/engagements/engagement_form.html new file mode 100644 index 0000000..e05c639 --- /dev/null +++ b/engagements/templates/engagements/engagement_form.html @@ -0,0 +1,32 @@ +{% extends "core/base.html" %} + +{% load static %} + +{% block title %}Create new engagement{% endblock title %} +{% block extra_head_tags %} + +{% endblock extra_head_tags %} + +{% block content %} + +
+
+

{{ title }}

+

TAKE THIS OUT

+ × +

Step 1

+

To roughly plan out future events, you provide the minimal details here: start date, end date (optional),the type of Engagement (Assessment, Inspection or Sampling), the external site or operation and finally the inspectors who are carrying out the work.

+

Step 2

+

So that we can track the finer details involved with an Assessment or Inspection, each Engagement comprises additional components, such as Planning, On-site and Reporting. Inspector time can be allocated to these components. In addition, each compontent can be associated with Instruments, such as DSCs, etc. After you create the overarching Engagement using this form, you will have the opportunity to add components.

+
+
+

Enter main details:

+
{% csrf_token %} + {{ form.as_p }} + +
+
+
+ +{% endblock content %} diff --git a/engagements/templates/engagements/engagement_plan_for_site.html b/engagements/templates/engagements/engagement_plan_for_site.html new file mode 100644 index 0000000..55ab54b --- /dev/null +++ b/engagements/templates/engagements/engagement_plan_for_site.html @@ -0,0 +1,35 @@ +{% extends "core/base.html" %} + +{% block title %}Create new engagement{% endblock title %} + +{% block content %} + +
+

{{ title }}

+
+ + × +

Step 1

+

To roughly plan out future events, you provide the minimal details here: start date, end date (optional),the type of Engagement (Assessment, Inspection or Sampling), the external site or operation and finally the inspectors who are carrying out the work.

+

Step 2

+

So that we can track the finer details involved with an Assessment or Inspection, each Engagement comprises additional components, such as Planning, On-site and Reporting. Inspector time can be allocated to these components. In addition, each compontent can be associated with Instruments, such as DSCs, etc. After you create the overarching Engagement using this form, you will have the opportunity to add components.

+
+ +
+
+
+

Enter main details:

+
{% csrf_token %} + {{ form.as_p }} + +
+
+
+

Current Engagement Plan for X

+
+ +
+
+ +{% endblock content %} diff --git a/engagements/templates/engagements/ep_org.html b/engagements/templates/engagements/ep_org.html new file mode 100644 index 0000000..202100a --- /dev/null +++ b/engagements/templates/engagements/ep_org.html @@ -0,0 +1,427 @@ +{% extends "core/base.html" %} + +{% block title %}Create new engagement{% endblock title %} + +{% load table_extras %} + +{% load static %} + +{% block content %} + +
+

Engagement Plans for {{ entity.name }}

+ Add New Regulatory Engagement | Add New Engagement +
+ +
+

2023

+ + + + + + + + + + + + + + + + + {% for e in engagements %} + + + + + + + + + + + + + {% endfor %} + +
Start DateEnd DateEngagementEngagement TypeArea/ThemeInspectors InvolvedDSCsTravel EffortPlanning and Regulation EffortCompletion Status
{{ e.proposed_start_date|date:'j M Y' }}{{ e.proposed_end_date|date:'j M Y' }}{{ e }}{{ e.friendly_type }}Area Theme +
    + {% for inspector in e.officers.all %} +
  • {{ inspector }}
  • + {% endfor %} +
+
+ + TBCTBCIncomplete
+ +
+ +
+ +
+
+
+

Total DSC coverage

+ + + + + + {% for dsc in dscs %} + + + + + {% endfor %} +
DSCAllocated time
{{ dsc }} {{ dsc | effort_for_org:entity }}
+
+
+

Another table of data

+ + + + + + {% for dsc in dscs %} + + + + + {% endfor %} +
DSCAllocated time
{{ dsc }} {{ dsc | effort_for_org:entity }}
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{% endblock content %} diff --git a/engagements/templates/engagements/index.html b/engagements/templates/engagements/index.html new file mode 100644 index 0000000..8d5df36 --- /dev/null +++ b/engagements/templates/engagements/index.html @@ -0,0 +1,30 @@ +{% extends "core/base.html" %} + +{% block title %}Engagements{% endblock title %} + +{% block content %} + +
+

Engagement Planning

+
+ +

Your entities

+ + + + + + + + {% for e in entities %} + + + + + + {% endfor %} +
Engagement PlanScheduled EngagementsTotal time
{{ e.name }}{{ e.engagement_set.all.count }}NA
+
+
+ +{% endblock content %} diff --git a/engagements/templates/engagements/organisations.html b/engagements/templates/engagements/organisations.html new file mode 100644 index 0000000..5bbd1b5 --- /dev/null +++ b/engagements/templates/engagements/organisations.html @@ -0,0 +1,50 @@ +{% extends "core/base.html" %} +{% load table_extras %} + +{% block title %}Regulated Entities{% endblock title %} + +{% block content %} + +
+

Regulated Entities

+
+ + + + + + + + + {% for e in entities %} + + + + + + + + {% endfor %} +
EntityTeamLead Inspector[s]Responsible Person[s]Accountable Person[s]
{{ e.name }}{{ e.lead_team }} + {% if e.lead_inspector.all %} + {{ e.lead_inspector.all|commalist }} + {% endif %} + + + {% if e.rp.all %} + {% for p in e.rp.all %} + {{ p }} + {% endfor %} + {% endif %} + + + {% if e.ap.all %} + {% for p in e.ap.all %} + {{ p }} + {% endfor %} + {% endif %} +
+
+
+ +{% endblock content %} diff --git a/engagements/templates/engagements/snippets/effort_summary_panel.html b/engagements/templates/engagements/snippets/effort_summary_panel.html new file mode 100644 index 0000000..235a67a --- /dev/null +++ b/engagements/templates/engagements/snippets/effort_summary_panel.html @@ -0,0 +1,41 @@ +{% load table_extras %} + +{% if e.is_planned %} +
+{% else %} +
+{% endif %} +
+
+
{{ e.proposed_start_date|date:'j M Y' }} - {{ e.effort_type }}
+
+
+

{{ e.effort_total_hours|floatformat }} hrs

+ Planned: {{ e.is_planned }} + +
+
+
+ Inspectors: {{ e.officers.all|commalist }} +
+
+ Start time: {{ e.proposed_start_date|date:'H:i' }} + {% if e.proposed_end_date %} + - {{ e.proposed_end_date|date:'H:i' }} + {% endif %} +
+ +
+ {% if e.sub_instruments.all %} + DSCs: +
    + {% for dsc in e.sub_instruments.all %} +
  • {{ dsc.title }}
  • + {% endfor %} +
+ {% endif %} + +
+
-- cgit v1.2.3