Update race result standings handling
All checks were successful
Build Formula10 Docker Image / build-docker (push) Successful in 14s
All checks were successful
Build Formula10 Docker Image / build-docker (push) Successful in 14s
This commit is contained in:
@ -98,23 +98,23 @@
|
||||
|
||||
{#@formatter:off#}
|
||||
{% macro pxx_guess_colorization(driver_abbr='', result=none) -%}
|
||||
{% if driver_abbr == result.pxx(-3).abbr %}fw-bold
|
||||
{% elif driver_abbr == result.pxx(-2).abbr %}text-danger fw-bold
|
||||
{% elif driver_abbr == result.pxx(-1).abbr %}text-warning fw-bold
|
||||
{% elif driver_abbr == result.pxx(0).abbr %}text-success fw-bold
|
||||
{% elif driver_abbr == result.pxx(1).abbr %}text-warning fw-bold
|
||||
{% elif driver_abbr == result.pxx(2).abbr %}text-danger fw-bold
|
||||
{% elif driver_abbr == result.pxx(3).abbr %}fw-bold{% endif %}
|
||||
{% if (driver_abbr == result.pxx(-3).abbr) and (driver_abbr != "NON") %}fw-bold
|
||||
{% elif (driver_abbr == result.pxx(-2).abbr) and (driver_abbr != "NON") %}text-danger fw-bold
|
||||
{% elif (driver_abbr == result.pxx(-1).abbr) and (driver_abbr != "NON") %}text-warning fw-bold
|
||||
{% elif (driver_abbr == result.pxx(0).abbr) %}text-success fw-bold
|
||||
{% elif (driver_abbr == result.pxx(1).abbr) and (driver_abbr != "NON") %}text-warning fw-bold
|
||||
{% elif (driver_abbr == result.pxx(2).abbr) and (driver_abbr != "NON") %}text-danger fw-bold
|
||||
{% elif (driver_abbr == result.pxx(3).abbr) and (driver_abbr != "NON") %}fw-bold{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro pxx_points_tooltip_text(driver_abbr='', result=none) -%}
|
||||
{% if driver_abbr == result.pxx(-3).abbr %}1 Point
|
||||
{% elif driver_abbr == result.pxx(-2).abbr %}3 Points
|
||||
{% elif driver_abbr == result.pxx(-1).abbr %}6 Points
|
||||
{% elif driver_abbr == result.pxx(0).abbr %}10 Points
|
||||
{% elif driver_abbr == result.pxx(1).abbr %}6 Points
|
||||
{% elif driver_abbr == result.pxx(2).abbr %}3 Points
|
||||
{% elif driver_abbr == result.pxx(3).abbr %}1 Point
|
||||
{% if (driver_abbr == result.pxx(-3).abbr) and (driver_abbr != "NON") %}1 Point
|
||||
{% elif (driver_abbr == result.pxx(-2).abbr) and (driver_abbr != "NON") %}3 Points
|
||||
{% elif (driver_abbr == result.pxx(-1).abbr) and (driver_abbr != "NON") %}6 Points
|
||||
{% elif (driver_abbr == result.pxx(0).abbr) %}10 Points
|
||||
{% elif (driver_abbr == result.pxx(1).abbr) and (driver_abbr != "NON") %}6 Points
|
||||
{% elif (driver_abbr == result.pxx(2).abbr) and (driver_abbr != "NON") %}3 Points
|
||||
{% elif (driver_abbr == result.pxx(3).abbr) and (driver_abbr != "NON") %}1 Point
|
||||
{% else %}0 Points{% endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
|
||||
@ -65,17 +65,14 @@
|
||||
{% endif %}
|
||||
</h5>
|
||||
|
||||
<form action="/result-enter/
|
||||
|
||||
|
||||
|
||||
|
||||
{%- if active_result is not none %}{{ active_result.race.name }}{% else %}{{ current_race.name }}{% endif %}"
|
||||
{# @formatter:off #}
|
||||
<form action="/result-enter/{%- if active_result is not none %}{{ active_result.race.name }}{% else %}{{ current_race.name }}{% endif %}"
|
||||
method="post">
|
||||
{# @formatter:on #}
|
||||
<ul id="columns" class="list-group list-group-flush">
|
||||
|
||||
{% if active_result is not none %}
|
||||
{% set drivers = active_result.pxx_drivers_values %}
|
||||
{% set drivers = active_result.all_positions %}
|
||||
{% else %}
|
||||
{% set drivers = model.all_drivers_except_none() %}
|
||||
{% endif %}
|
||||
@ -98,9 +95,10 @@
|
||||
<div class="form-check form-check-reverse d-inline-block mx-2">
|
||||
<input type="checkbox" class="form-check-input" value="{{ driver.name }}"
|
||||
id="exclude-{{ driver.name }}" name="exclude-drivers"
|
||||
{% if (active_result is not none) and (driver in active_result.excluded_drivers) %}checked{% endif %}>
|
||||
{% if (active_result is not none) and (driver in active_result.excluded_drivers.values()) %}checked{% endif %}>
|
||||
<label for="exclude-{{ driver.name }}"
|
||||
class="form-check-label text-muted" data-bs-toggle="tooltip" title="Exclude driver from points calculation">Exclude</label>
|
||||
class="form-check-label text-muted" data-bs-toggle="tooltip"
|
||||
title="Exclude driver from points calculation">Exclude</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user