From 996230333c18c9d2315451a13cea632237b83342 Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Wed, 2 Feb 2022 12:23:17 +0100 Subject: [PATCH] Set new logic for the cern_level color variable --- .../templates/cern/calculator.report.html.j2 | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/cara/apps/templates/cern/calculator.report.html.j2 b/cara/apps/templates/cern/calculator.report.html.j2 index cea08ada..36e65cd2 100644 --- a/cara/apps/templates/cern/calculator.report.html.j2 +++ b/cara/apps/templates/cern/calculator.report.html.j2 @@ -1,5 +1,10 @@ {% extends "base/calculator.report.html.j2" %} +{% if ((prob_inf > 10) or (expected_new_cases >= 1)) %} {% set cern_level = 'red' %} +{% elif (2 <= prob_inf <= 10) %} {% set cern_level = 'orange' %} +{% else %} {% set cern_level = 'green' %} +{% endif %} + {% block report_preamble_navtab %}