From d6d688eed9b9532ff79eb4c4ac8fb09b6e1ae2c8 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Thu, 29 Aug 2024 15:00:37 +0100 Subject: Started journey to move to Tailwind --- engagements/templates/engagements/ep_org.html | 16 +++-- engagements/templates/engagements/index.html | 13 ++-- .../templates/engagements/organisations.html | 84 +++++++++++----------- 3 files changed, 58 insertions(+), 55 deletions(-) (limited to 'engagements') diff --git a/engagements/templates/engagements/ep_org.html b/engagements/templates/engagements/ep_org.html index 202100a..370a117 100644 --- a/engagements/templates/engagements/ep_org.html +++ b/engagements/templates/engagements/ep_org.html @@ -8,14 +8,16 @@ {% block content %} -
-

Engagement Plans for {{ entity.name }}

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

Engagement Plans for {{ entity.name }}

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

2023

- +
+

2023

+
@@ -64,7 +66,7 @@
-
+

Total DSC coverage

diff --git a/engagements/templates/engagements/index.html b/engagements/templates/engagements/index.html index 8d5df36..dbd62f9 100644 --- a/engagements/templates/engagements/index.html +++ b/engagements/templates/engagements/index.html @@ -4,18 +4,18 @@ {% block content %} -
-

Engagement Planning

-
+
+

Engagement Planning

+

Your entities

-

Your entities

- -
Start Date
+
+ + {% for e in entities %} @@ -25,6 +25,5 @@ {% endfor %}
Engagement Plan Scheduled Engagements Total time
{{ e.name }}
-
{% endblock content %} diff --git a/engagements/templates/engagements/organisations.html b/engagements/templates/engagements/organisations.html index 5bbd1b5..7991784 100644 --- a/engagements/templates/engagements/organisations.html +++ b/engagements/templates/engagements/organisations.html @@ -5,46 +5,48 @@ {% 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 %} -
-
-
+
+

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 %} -- cgit v1.2.3 From 2cc69382c15aeed665b32aed01c701840ee80c9c Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Fri, 30 Aug 2024 15:17:43 +0100 Subject: Removed most of w3 and working on fixing the forms. --- engagements/forms.py | 155 +++--- .../templates/engagements/engagement_create.html | 62 ++- .../templates/engagements/engagement_detail.html | 167 ++++--- .../engagements/engagement_effort_create.html | 34 +- .../templates/engagements/engagement_form.html | 78 +++- engagements/templates/engagements/ep_org.html | 518 ++++----------------- engagements/templates/engagements/index.html | 48 +- .../templates/engagements/organisations.html | 90 ++-- .../engagements/snippets/effort_summary_panel.html | 56 +-- 9 files changed, 480 insertions(+), 728 deletions(-) (limited to 'engagements') diff --git a/engagements/forms.py b/engagements/forms.py index ae01916..a1c3c44 100644 --- a/engagements/forms.py +++ b/engagements/forms.py @@ -1,74 +1,56 @@ -from crispy_forms.helper import FormHelper -from crispy_forms.layout import Field, Fieldset, Layout, Submit from django import forms from django.forms.widgets import HiddenInput from .models import Engagement, EngagementEffort + # TODO - need to handle errors correctly in this form and in the template class EngagementEffortReportingCreateForm(forms.ModelForm): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) - self.helper = FormHelper() - self.helper.layout = Layout( - Fieldset( - "This is a form", - Field("is_planned"), - Field("proposed_start_date", css_class="w3-input w3-border w3-round", type="date"), - Field("proposed_end_date", css_class="w3-input w3-border w3-round"), - "officers", - "notes", - ), - Submit("submit", "Submit", css_class="w3-button w3-green"), - ) + self.fields['is_planned'].widget.attrs.update({"class": "select-lg"}) + # for field in self.fields.values(): + # field.widget.attrs['class'] = 'mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50' class Meta: model = EngagementEffort fields = [ - "is_planned", - "proposed_start_date", - "proposed_end_date", - "officers", - "notes", + 'is_planned', + 'proposed_start_date', + 'proposed_end_date', + 'officers', + 'notes', ] - help_texts = { - "is_planned": ("
To distinguish planned events from retrospective recording") - } widgets = { - "proposed_start_date": forms.DateTimeInput( + # 'is_planned': forms.Select( + # choices=( + # (True, "YES"), + # (False, "NO"), + # ), + # attrs={'class': 'select-lg w-full max-w-xs'} + # ), + 'proposed_start_date': forms.DateTimeInput( attrs={ - "class": "w3-input w3-border w3-round", - "type": "datetime-local", + 'type': 'datetime-local', + 'class': 'mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50' }, - format="j M y H:i", + format='j M y H:i', ), - "proposed_end_date": forms.DateTimeInput( + 'proposed_end_date': forms.DateTimeInput( attrs={ - "class": "w3-input w3-border w3-round", - "type": "datetime-local", + 'type': 'datetime-local', + 'class': 'mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50' }, - format="j M y H:i", + format='j M y H:i', ), + 'officers': forms.SelectMultiple(attrs={'class': 'mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50'}), + 'notes': forms.Textarea(attrs={'class': 'mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50', 'rows': 3}), } class EngagementEffortRegulationCreateForm(forms.ModelForm): - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - self.helper = FormHelper() - self.helper.layout = Layout( - Fieldset( - "This is a form", - Field("is_planned"), - Field("proposed_start_date", css_class="w3-input w3-border w3-round", type="date"), - Field("proposed_end_date", css_class="w3-input w3-border w3-round"), - "sub_instruments", - "officers", - ), - Submit("submit", "Submit", css_class="w3-button w3-green"), - ) class Meta: model = EngagementEffort @@ -86,14 +68,12 @@ class EngagementEffortRegulationCreateForm(forms.ModelForm): widgets = { "proposed_start_date": forms.DateTimeInput( attrs={ - "class": "w3-input w3-border w3-round", "type": "datetime-local", }, format="j M y H:i", ), "proposed_end_date": forms.DateTimeInput( attrs={ - "class": "w3-input w3-border w3-round", "type": "datetime-local", }, format="j M y H:i", @@ -102,20 +82,6 @@ class EngagementEffortRegulationCreateForm(forms.ModelForm): class EngagementEffortPlanningCreateForm(forms.ModelForm): - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - self.helper = FormHelper() - self.helper.layout = Layout( - Fieldset( - "This is a form", - Field("is_planned"), - Field("proposed_start_date", css_class="w3-input w3-border w3-round", type="date"), - Field("proposed_end_date", css_class="w3-input w3-border w3-round"), - "officers", - "notes", - ), - Submit("submit", "Submit", css_class="w3-button w3-green"), - ) class Meta: model = EngagementEffort @@ -132,14 +98,12 @@ class EngagementEffortPlanningCreateForm(forms.ModelForm): widgets = { "proposed_start_date": forms.DateTimeInput( attrs={ - "class": "w3-input w3-border w3-round", "type": "datetime-local", }, format="j M y H:i", ), "proposed_end_date": forms.DateTimeInput( attrs={ - "class": "w3-input w3-border w3-round", "type": "datetime-local", }, format="j M y H:i", @@ -150,22 +114,15 @@ class EngagementEffortPlanningCreateForm(forms.ModelForm): class EngagementEffortTravelCreateForm(forms.ModelForm): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) - self.helper = FormHelper() - self.helper.layout = Layout( - Fieldset( - "This is a form", - Field("is_planned"), - Field("proposed_start_date", css_class="w3-input w3-border w3-round", type="date"), - Field("proposed_end_date", css_class="w3-input w3-border w3-round"), - "officers", - ), - Submit("submit", "Submit", css_class="w3-button w3-green"), - ) + self.fields['is_planned'].widget.attrs.update({"class": "select-lg"}) + for field in self.fields.values(): + field.widget.attrs['class'] = 'mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50' class Meta: model = EngagementEffort fields = ["is_planned", "proposed_start_date", "proposed_end_date", "officers"] widgets = { + "is_planned": forms.Select(choices=((True, "YES"), (False, "NO")), attrs={"class": "select select-bordered w-full max-w-xs"}), "proposed_start_date": forms.DateTimeInput(attrs={"type": "datetime-local"}), "proposed_end_date": forms.DateTimeInput(attrs={"type": "datetime-local"}), } @@ -174,40 +131,44 @@ class EngagementEffortTravelCreateForm(forms.ModelForm): class EngagementEffortCreateForm(forms.ModelForm): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) - self.fields["engagement"].widget = HiddenInput() - self.fields["effort_type"].widget = HiddenInput() + self.fields['engagement'].widget = HiddenInput() + self.fields['effort_type'].widget = HiddenInput() if kwargs.get("initial"): if not kwargs["initial"]["effort_type"] == "REGULATION": self.fields["sub_instruments"].widget = HiddenInput() + # Apply Tailwind classes to all visible fields + # for field in self.visible_fields(): + # field.widget.attrs['class'] = 'mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50' + class Meta: model = EngagementEffort fields = "__all__" widgets = { - "is_planned": forms.Select( - choices=( - (True, "YES"), - (False, "NO"), - ), - attrs={"class": "w3-border"}, - ), + # "is_planned": forms.Select( + # choices=( + # (True, "YES"), + # (False, "NO"), + # ), + # attrs={'class': 'mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50'} + # ), "proposed_start_date": forms.DateTimeInput( - attrs={"class": "w3-input w3-border w3-round", "type": "date"}, + attrs={ + "type": "datetime-local", + "class": "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50" + }, format="j M y H:i", ), "proposed_end_date": forms.DateTimeInput( - attrs={"class": "w3-input w3-border w3-round", "type": "date"}, + attrs={ + "type": "datetime-local", + "class": "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50" + }, format="j M y H:i", ), - "effort_type": forms.Select(attrs={"class": "w3-select w3-border w3-round"}), - "officers": forms.SelectMultiple(attrs={"class": "w3-select w3-border w3-round"}), - "sub_instruments": forms.SelectMultiple(attrs={"class": "w3-select w3-border w3-round"}), - } - help_texts = { - "proposed_start_date": "YYYY-MM-DD HH:MM " - "(Please include time here)", - "proposed_end_date": "YYYY-MM-DD HH:MM " - "(Please include time here)", + "effort_type": forms.Select(attrs={'class': 'mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50'}), + "officers": forms.SelectMultiple(attrs={'class': 'mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50'}), + "sub_instruments": forms.SelectMultiple(attrs={'class': 'mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50'}), } @@ -235,8 +196,8 @@ class EngagementCreateForm(forms.ModelForm): "proposed_end_date": "YYYY-MM-DD", } widgets = { - "proposed_start_date": forms.DateInput(attrs={"class": "w3-input w3-border w3-round", "type": "date"}), - "proposed_end_date": forms.DateInput(attrs={"class": "w3-input w3-border w3-round", "type": "date"}), - "engagement_type": forms.Select(attrs={"class": "w3-select w3-input w3-border w3-round"}), - "officers": forms.SelectMultiple(attrs={"class": "w3-input w3-border w3-round"}), + "proposed_start_date": forms.DateInput(attrs={"type": "date"}), + "proposed_end_date": forms.DateInput(attrs={"type": "date"}), + "engagement_type": forms.Select(), + "officers": forms.SelectMultiple(), } diff --git a/engagements/templates/engagements/engagement_create.html b/engagements/templates/engagements/engagement_create.html index 1e72ca0..e4aeee6 100644 --- a/engagements/templates/engagements/engagement_create.html +++ b/engagements/templates/engagements/engagement_create.html @@ -3,27 +3,49 @@ {% 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 component 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.

+
+
-
-

{{ 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 }} - -
+
+

Enter main details:

+
+ {% csrf_token %} + {% for field in form %} +
+ +
+ {{ field }} +
+ {% if field.help_text %} +

{{ field.help_text|safe }}

+ {% endif %} + {% for error in field.errors %} +

{{ error }}

+ {% endfor %} +
+ {% endfor %} +
+ +
+
+
+
- {% endblock content %} diff --git a/engagements/templates/engagements/engagement_detail.html b/engagements/templates/engagements/engagement_detail.html index 85ef220..c75523b 100644 --- a/engagements/templates/engagements/engagement_detail.html +++ b/engagements/templates/engagements/engagement_detail.html @@ -4,75 +4,110 @@ {% block title %}{{ engagement }}{% endblock title %} {% block content %} +
+
+
+

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

+
+
+ -
-
-

{{ 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 -

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
-
-
+

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
+
-
-

Effort for this engagement

- Add: - Travel | - Planning | - Regulation | - Reporting +
+
+

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 %} + {% if effort %} +
+ {% for e in effort.all %} +
+ {% include "engagements/snippets/effort_summary_panel.html" with e=e %} +
+ {% endfor %} +
+ {% else %} +

No effort records found for this engagement.

+ {% endif %} +
+
+
- {% endfor %} - {% endif %}
- - {% endblock content %} +{% endblock content %} diff --git a/engagements/templates/engagements/engagement_effort_create.html b/engagements/templates/engagements/engagement_effort_create.html index 65e2e21..b776fd8 100644 --- a/engagements/templates/engagements/engagement_effort_create.html +++ b/engagements/templates/engagements/engagement_effort_create.html @@ -1,20 +1,34 @@ {% 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 }}

+
+
+

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

+

{{ engagement.external_party }} on {{ engagement.proposed_start_date }}

-
-

Enter details:

-
{% csrf_token %} - {% crispy form form.helper %} -
-
+
+ {% csrf_token %} + {% for field in form %} +
+ + {{ field }} + {% if field.help_text %} +

{{ field.help_text }}

+ {% endif %} +
+ {% endfor %} +
+ +
+
+
{% endblock content %} diff --git a/engagements/templates/engagements/engagement_form.html b/engagements/templates/engagements/engagement_form.html index e05c639..3dfe249 100644 --- a/engagements/templates/engagements/engagement_form.html +++ b/engagements/templates/engagements/engagement_form.html @@ -3,30 +3,66 @@ {% load static %} {% block title %}Create new engagement{% endblock title %} -{% block extra_head_tags %} - -{% endblock extra_head_tags %} {% 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 component 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.

+
+
-
-
-

{{ 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 }} - -
+
+

Enter main details:

+
+
+
+ {% csrf_token %} + {% for field in form %} +
+ + {% if field.field.widget.input_type == 'checkbox' %} +
+ + {{ field.help_text|safe }} +
+ {% elif field.field.widget.input_type == 'select' %} + + {% else %} + + {% endif %} + {% if field.help_text and field.field.widget.input_type != 'checkbox' %} +

{{ field.help_text|safe }}

+ {% endif %} + {% for error in field.errors %} +

{{ error }}

+ {% endfor %} +
+ {% endfor %} +
+ +
+
+
+
+
+
- {% endblock content %} diff --git a/engagements/templates/engagements/ep_org.html b/engagements/templates/engagements/ep_org.html index 370a117..9fbb9dd 100644 --- a/engagements/templates/engagements/ep_org.html +++ b/engagements/templates/engagements/ep_org.html @@ -1,429 +1,111 @@ {% 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 %} - - - - - - - - +
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 %} -
-
-
    - {% for dsc in e.dscs %} -
  • {{ dsc.short }}
  • +
    +
    +
    +

    Engagement Plans for {{ entity.name }}

    +
    +
    + + +

    2023

    +
    + + + + + + + + + + + + + + + + + {% for e in engagements %} + + + + + + + + + + + + {% endfor %} - - - - - - - {% 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
    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 }}
    +
+
+ +
+
+

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 index dbd62f9..a63aceb 100644 --- a/engagements/templates/engagements/index.html +++ b/engagements/templates/engagements/index.html @@ -3,27 +3,33 @@ {% block title %}Engagements{% endblock title %} {% block content %} +
+
+
+

Engagement Planning

+
+
+

Your entities

-
-

Engagement Planning

-

Your entities

- - - - - - - - - - {% for e in entities %} - - - - - - {% endfor %} -
Engagement PlanScheduled EngagementsTotal time
{{ e.name }}{{ e.engagement_set.all.count }}NA
+ + + + + + + + + + {% 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 index 7991784..f2605c4 100644 --- a/engagements/templates/engagements/organisations.html +++ b/engagements/templates/engagements/organisations.html @@ -4,49 +4,53 @@ {% 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 %} -
+
+
+
+

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 }}{% if not forloop.last %}, {% endif %} + {% endfor %} + {% endif %} + + {% if e.ap.all %} + {% for p in e.ap.all %} + {{ p }}{% if not forloop.last %}, {% endif %} + {% endfor %} + {% endif %} +
+
- +
{% endblock content %} diff --git a/engagements/templates/engagements/snippets/effort_summary_panel.html b/engagements/templates/engagements/snippets/effort_summary_panel.html index 235a67a..d0dc256 100644 --- a/engagements/templates/engagements/snippets/effort_summary_panel.html +++ b/engagements/templates/engagements/snippets/effort_summary_panel.html @@ -1,41 +1,33 @@ {% 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 %} -
- -
+
+

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 %} -
+
+ DSCs: +
    + {% for dsc in e.sub_instruments.all %} +
  • {{ dsc.title }}
  • + {% endfor %} +
+
{% endif %} -
-- cgit v1.2.3