From 5523fe28dc86ca47dea034b5abdef5092590a8be Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Mon, 2 Aug 2021 17:18:01 +0200 Subject: [PATCH] Input data with different cards and min height for animation css --- .../templates/base/calculator.report.html.j2 | 438 ++++++++++-------- .../cern/templates/calculator.report.html.j2 | 121 +++-- 2 files changed, 308 insertions(+), 251 deletions(-) diff --git a/cara/apps/calculator/templates/base/calculator.report.html.j2 b/cara/apps/calculator/templates/base/calculator.report.html.j2 index 8a6a9848..995e2ec3 100644 --- a/cara/apps/calculator/templates/base/calculator.report.html.j2 +++ b/cara/apps/calculator/templates/base/calculator.report.html.j2 @@ -51,17 +51,38 @@
-
-

-

- {% block report_summary %} - Taking into account the uncertainties tied to the model variables, in this scenario, the probability of one exposed occupant getting infected is {{ prob_inf | non_zero_percentage }}[*] and the expected number of new cases is {{ expected_new_cases | float_format }}. - {% endblock report_summary %} -
-

[*] The results are based on the parameters and assumptions published in the CERN Open Report CERN-OPEN-2021-004

- -

-
+
+

+

+
+
+
Probability of infection (%)
+
+ {% block warning_animation %} +
+ {{prob_inf | non_zero_percentage}} + + + + +
+ {% endblock warning_animation %} +
+
+ + {% block report_summary %} + + {% endblock report_summary %} +
+ {% block report_summary_footnote %} + {% endblock report_summary_footnote %} +
+ +

[*] The results are based on the parameters and assumptions published in the CERN Open Report CERN-OPEN-2021-004

+

+
@@ -114,13 +135,26 @@ {% endblock report_results %} {% block report_footer %} -
- - -

- Click the QR code to regenerate the report and get a shareable link.
Alternatively, scan to regenerate the report.
Mobile-friendly app coming soon! -

-
+
+
QR code + +
+
+
+
+ + +

+ Click the QR code to regenerate the report and get a shareable link.
Alternatively, scan to regenerate the report.
Mobile-friendly app coming soon! +

+
+
+
+
@@ -172,181 +206,207 @@
{% block simulation_overview %} -

Simulation:

- -

Simulation Name: {{ form.simulation_name }}

-

Room Number: {{ form.room_number }}

- -

Input data:

-
    -
  • Virus variant: - {% if form.virus_type == "SARS_CoV_2" %} - SARS-CoV-2 (nominal strain) - {% elif form.virus_type == "SARS_CoV_2_B117" %} - SARS-CoV-2 (Alpha VOC) - {% elif form.virus_type == "SARS_CoV_2_P1" %} - SARS-CoV-2 (Gamma VOC) - {% elif form.virus_type == "SARS_CoV_2_B16172" %} - SARS-CoV-2 (Delta VOC) - {% endif %} -

  • -
  • Room Volume: {{ model.concentration_model.room.volume }} m³

  • -
  • Room Central Heating: {{ "On" if form.room_heating_option else "Off" }}

  • -
- -

Ventilation data:

-
    -
  • Mechanical ventilation: - {% if form.ventilation_type == "mechanical_ventilation" %} - Yes

  • -
      -
    • - {% if form.mechanical_ventilation_type == "mech_type_air_supply"%} - Air supply flow rate: {{ form.air_supply }} m³ / hour - {% elif form.mechanical_ventilation_type == "mech_type_air_changes"%} - Air changes per hour: {{ form.air_changes }} h⁻¹ - {% endif %} -

    • -
    - {% else %} - No - {% endif %} -
  • Natural ventilation: - {% if form.ventilation_type == "natural_ventilation"%} - Yes

  • -
      -
    • Number of windows: {{ form.windows_number }}

    • -
    • Height of window: {{ form.window_height }} m

    • -
    • Window type: - {% if form.window_type == "window_hinged" %} - Top- or Bottom-Hung

    • -
    • Width of window: {{ form.window_width }} m

    • - {% elif form.window_type == "window_sliding" %} - Sliding / Side-Hung

      - {% endif %} -
    • Opening distance: {{ form.opening_distance }} m

    • -
    • Windows open: - {% if form.window_opening_regime == "windows_open_periodically" %} - Periodically for {{ form.windows_duration | readable_minutes}} - every {{ form.windows_frequency | readable_minutes}} - {% elif form.window_opening_regime == "windows_open_permanently" %} - Permanently - {% endif %} -

    • -
    -

    When using the natural ventilation option, air flows are calculated using averaged hourly temperatures for the Geneva region, based on historical data for the month selected.

    - {% else %} - No

    - {% endif %} -
  • HEPA Filtration: {{ 'Yes' if form.hepa_option else 'No' }}

  • - {% if form.hepa_option %} -
      -
    • HEPA amount: {{ form.hepa_amount }} m³ / hour

    • -
    - {% endif %} -
- -

Event data:

-
    -
  • Number of attendees and infected people: {{ form.total_people }} in attendance, of whom {{ form.infected_people }} - {{ "is" if form.infected_people == 1 else "are" }} - infected.

  • -
  • - Activity type: - {% if form.activity_type == "office" %} - Office – typical scenario with all persons seated, talking occasionally (talking assumed for 1/3rd of the time). - {% elif form.activity_type == "meeting" %} - Meeting – typical scenario with all persons seated, one person talking at a time. - {% elif form.activity_type == "callcentre" %} - Call Centre = typical office-like scenario with all persons seated, all talking continuously. - {% elif form.activity_type == "controlroom-day" %} - Control Room (Day Shift) = specific control room scenario, all persons seated, all talking 50% of the time. - {% elif form.activity_type == "controlroom-night" %} - Control Room (Night Shift) = specific control room scenario with all persons seated, all talking for 10% of the time. - {% elif form.activity_type == "library" %} - Library = Library scenario with all persons seated, breathing and not talking. - {% elif form.activity_type == "workshop" %} - Workshop = assembly workshop environment, all persons doing moderate physical activity, talking 50% of the time. - {% elif form.activity_type == "training" %} - Training – one person (the trainer) standing, talking, all others seated, talking quietly (whispering). It is assumed the trainer is the infected person, for the worst case scenario. - {% elif form.activity_type == "lab" %} - Laboratory = Lab or technical environment, all persons doing light physical activity, talking 50% of the time. - {% elif form.activity_type == "gym" %} - Gym = For comparison only, all persons doing heavy physical exercise, breathing and not talking. - {% endif %} -

  • -
  • Exposed occupant(s) activity time:

  • +
    +
    Simulation:
    +
    +

    Simulation Name: {{ form.simulation_name }}

    +

    Room Number: {{ form.room_number }}

    +
    +
    +
    +
    +
    Input data:
    +
      -
    • Start time: {{ form.exposed_start | minutes_to_time }}    End time: {{ form.exposed_finish | minutes_to_time }}

    • +
    • Virus variant: + {% if form.virus_type == "SARS_CoV_2" %} + SARS-CoV-2 (nominal strain) + {% elif form.virus_type == "SARS_CoV_2_B117" %} + SARS-CoV-2 (Alpha VOC) + {% elif form.virus_type == "SARS_CoV_2_P1" %} + SARS-CoV-2 (Gamma VOC) + {% elif form.virus_type == "SARS_CoV_2_B16172" %} + SARS-CoV-2 (Delta VOC) + {% endif %} +

    • +
    • Room Volume: {{ model.concentration_model.room.volume }} m³

    • +
    • Room Central Heating: {{ "On" if form.room_heating_option else "Off" }}

    -
  • Infected occupant(s) activity time:

  • -
      -
    • Start time: {{ form.infected_start | minutes_to_time }}    End time: {{ form.infected_finish | minutes_to_time }}

    • -
    -
  • Event for the month of {{ form.event_month }}

  • -
- -

Break data:

+
+
+
+
+
Ventilation data:
+
+
    +
  • Mechanical ventilation: + {% if form.ventilation_type == "mechanical_ventilation" %} + Yes

  • +
      +
    • + {% if form.mechanical_ventilation_type == "mech_type_air_supply"%} + Air supply flow rate: {{ form.air_supply }} m³ / hour + {% elif form.mechanical_ventilation_type == "mech_type_air_changes"%} + Air changes per hour: {{ form.air_changes }} h⁻¹ + {% endif %} +

    • +
    + {% else %} + No + {% endif %} +
  • Natural ventilation: + {% if form.ventilation_type == "natural_ventilation"%} + Yes

  • +
      +
    • Number of windows: {{ form.windows_number }}

    • +
    • Height of window: {{ form.window_height }} m

    • +
    • Window type: + {% if form.window_type == "window_hinged" %} + Top- or Bottom-Hung

    • +
    • Width of window: {{ form.window_width }} m

    • + {% elif form.window_type == "window_sliding" %} + Sliding / Side-Hung

      + {% endif %} +
    • Opening distance: {{ form.opening_distance }} m

    • +
    • Windows open: + {% if form.window_opening_regime == "windows_open_periodically" %} + Periodically for {{ form.windows_duration | readable_minutes}} + every {{ form.windows_frequency | readable_minutes}} + {% elif form.window_opening_regime == "windows_open_permanently" %} + Permanently + {% endif %} +

    • +
    +

    When using the natural ventilation option, air flows are calculated using averaged hourly temperatures for the Geneva region, based on historical data for the month selected.

    + {% else %} + No

    + {% endif %} +
  • HEPA Filtration: {{ 'Yes' if form.hepa_option else 'No' }}

  • + {% if form.hepa_option %} +
      +
    • HEPA amount: {{ form.hepa_amount }} m³ / hour

    • +
    + {% endif %} +
+
+
+
+
+
Event data:
+
+
    +
  • Number of attendees and infected people: {{ form.total_people }} in attendance, of whom {{ form.infected_people }} + {{ "is" if form.infected_people == 1 else "are" }} + infected.

  • +
  • + Activity type: + {% if form.activity_type == "office" %} + Office – typical scenario with all persons seated, talking occasionally (talking assumed for 1/3rd of the time). + {% elif form.activity_type == "meeting" %} + Meeting – typical scenario with all persons seated, one person talking at a time. + {% elif form.activity_type == "callcentre" %} + Call Centre = typical office-like scenario with all persons seated, all talking continuously. + {% elif form.activity_type == "controlroom-day" %} + Control Room (Day Shift) = specific control room scenario, all persons seated, all talking 50% of the time. + {% elif form.activity_type == "controlroom-night" %} + Control Room (Night Shift) = specific control room scenario with all persons seated, all talking for 10% of the time. + {% elif form.activity_type == "library" %} + Library = Library scenario with all persons seated, breathing and not talking. + {% elif form.activity_type == "workshop" %} + Workshop = assembly workshop environment, all persons doing moderate physical activity, talking 50% of the time. + {% elif form.activity_type == "training" %} + Training – one person (the trainer) standing, talking, all others seated, talking quietly (whispering). It is assumed the trainer is the infected person, for the worst case scenario. + {% elif form.activity_type == "lab" %} + Laboratory = Lab or technical environment, all persons doing light physical activity, talking 50% of the time. + {% elif form.activity_type == "gym" %} + Gym = For comparison only, all persons doing heavy physical exercise, breathing and not talking. + {% endif %} +

  • +
  • Exposed occupant(s) activity time:

  • +
      +
    • Start time: {{ form.exposed_start | minutes_to_time }}    End time: {{ form.exposed_finish | minutes_to_time }}

    • +
    +
  • Infected occupant(s) activity time:

  • +
      +
    • Start time: {{ form.infected_start | minutes_to_time }}    End time: {{ form.infected_finish | minutes_to_time }}

    • +
    +
  • Event for the month of {{ form.event_month }}

  • +
+
+
+
+
+
Break data:
+
+ {% if form.infected_dont_have_breaks_with_exposed %} +

Exposed occupant(s):

+ {% endif %} +
    +
  • Lunch break: + {% if form.exposed_lunch_option%} + Yes

  • +
      +
    • Start time: {{ form.exposed_lunch_start | minutes_to_time }}    End time: {{ form.exposed_lunch_finish | minutes_to_time }}

    • +
    + {% else%} + No + {% endif %} +

    +
  • Coffee breaks: {{ form.exposed_number_of_coffee_breaks() }} + {% if form.exposed_number_of_coffee_breaks() > 0 %} + each of {{ form.exposed_coffee_duration }} minutes duration +

  • +
      + {%- for start_time, end_time in form.exposed_coffee_break_times() %} +
    • Coffee break {{ loop.index }}: Start: {{ start_time | minutes_to_time }}    End: {{ end_time | minutes_to_time }}

    • + {%- endfor %} +
    + {% endif %} +
+
+
+
{% if form.infected_dont_have_breaks_with_exposed %} -

Exposed occupant(s):

+
+
Infected occupant(s):
+
+
    +
  • Lunch break: + {% if form.infected_lunch_option%} + Yes

  • +
      +
    • Start time: {{ form.infected_lunch_start | minutes_to_time }}    End time: {{ form.infected_lunch_finish | minutes_to_time }}

    • +
    + {% else%} + No + {% endif %} +

    +
  • Coffee breaks: {{ form.infected_number_of_coffee_breaks() }} + {% if form.infected_number_of_coffee_breaks() > 0 %} + each of {{ form.infected_coffee_duration }} minutes duration +

  • +
      + {%- for start_time, end_time in form.infected_coffee_break_times() %} +
    • Coffee break {{ loop.index }}: Start: {{ start_time | minutes_to_time }}    End: {{ end_time | minutes_to_time }}

    • + {%- endfor %} +
    + {% endif %} +
+
+
{% endif %} - - - {% if form.infected_dont_have_breaks_with_exposed %} -

Infected occupant(s):

- - {% endif %} - -

Mask wearing:

- - +
+
+
Mask wearing:
+
+
    +
  • Masks worn at workstations? {{ 'Yes' if form.mask_wearing_option == "mask_on" else 'No' }}

  • + {% if form.mask_wearing_option == "mask_on" %} +
  • Mask type: {{ form.mask_type }}

  • + {% endif %} +
+
+
{% endblock simulation_overview %}
{% block report_preamble %} diff --git a/cara/apps/calculator/themes/cern/templates/calculator.report.html.j2 b/cara/apps/calculator/themes/cern/templates/calculator.report.html.j2 index 595a41ba..96c22fe0 100644 --- a/cara/apps/calculator/themes/cern/templates/calculator.report.html.j2 +++ b/cara/apps/calculator/themes/cern/templates/calculator.report.html.j2 @@ -6,70 +6,67 @@ {% endblock report_preamble_navtab %} -{% block report_summary %} -
-
-
Probability of infection (%)
- {% if (prob_inf < 5)%} {% set warning_color = 'bg-success' %} - {% elif (prob_inf >= 5 and prob_inf <= 15) %} {% set warning_color = 'bg-warning' %} - {% else %} {% set warning_color= 'bg-danger' %} - {% endif %} -
- {{prob_inf | non_zero_percentage}} - - - - -
-
-
- - 15) or (expected_new_cases >= 1)) %} - > - {% elif 5 <= prob_inf <= 15 %} - >