From e777a71d2a10ac064c3c1dd3accee5f8b12a6956 Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Tue, 14 Jun 2022 16:16:26 +0200 Subject: [PATCH] Added missing conditions to alternative scenarios and. bug fix --- cara/apps/calculator/static/css/report.css | 25 +++---------------- .../templates/cern/calculator.report.html.j2 | 12 ++++----- 2 files changed, 10 insertions(+), 27 deletions(-) diff --git a/cara/apps/calculator/static/css/report.css b/cara/apps/calculator/static/css/report.css index 99efd20c..f0e07d90 100644 --- a/cara/apps/calculator/static/css/report.css +++ b/cara/apps/calculator/static/css/report.css @@ -63,24 +63,6 @@ p.notes { width: 100pt; } -.red_bkg { - color: #000000; - background-color: #CD5C5C; - text-decoration: none; -} - -.yellow_bkg { - color: #000000; - background-color: #FFFF00; - text-decoration: none; -} - -.green_bkg { - color: #000000; - background-color: #90EE90; - text-decoration: none; -} - .icon_button { border: none; background: none; @@ -113,9 +95,6 @@ p.notes { #rules, #data { display: contents!important; - .card { - page-break-inside: avoid!important; - break-inside: avoid!important; } #link_reproduce_results { display: none!important; @@ -144,6 +123,10 @@ p.notes { .pi-box { max-width: 260px!important; } + .card { + page-break-inside: avoid!important; + break-inside: avoid!important; + } #link-results { display: none; } diff --git a/cara/apps/templates/cern/calculator.report.html.j2 b/cara/apps/templates/cern/calculator.report.html.j2 index c55cd6dd..c7c4bfdc 100644 --- a/cara/apps/templates/cern/calculator.report.html.j2 +++ b/cara/apps/templates/cern/calculator.report.html.j2 @@ -135,12 +135,12 @@ {% for scenario_name, scenario_stats in alternative_scenarios.stats.items() %} - {%if (( scenario_stats.probability_of_infection > 15) or (scenario_stats.expected_new_cases >= 1)) %} - - {% elif (5 <= scenario_stats.probability_of_infection <= 15) %} - - {% elif (scenario_stats.probability_of_infection < 5) %} - + {%if (( scenario_stats.probability_of_infection > 10) or (scenario_stats.expected_new_cases >= 1)) %} + + {% elif (2 <= scenario_stats.probability_of_infection <= 10) %} + + {% elif (scenario_stats.probability_of_infection < 2) %} + {% endif%} {{ scenario_name }} {{ scenario_stats.probability_of_infection | non_zero_percentage }}