Many frontend improvements
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:
@ -7,36 +7,51 @@
|
|||||||
{% block body %}
|
{% block body %}
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
Note
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title">Leaderboard</h5>
|
Points only include race picks.
|
||||||
<h6 class="card-subtitle">Points only include race picks</h6>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<table class="table table-bordered table-sm table-responsive mt-3">
|
<div class="card mt-2">
|
||||||
<thead>
|
<div class="card-header">
|
||||||
<tr>
|
Leaderboard
|
||||||
<th scope="col" class="text-center" style="min-width: 50px;">Place</th>
|
</div>
|
||||||
<th scope="col" class="text-center" style="min-width: 50px;">User</th>
|
|
||||||
<th scope="col" class="text-center" style="min-width: 100px;">Points</th>
|
|
||||||
<th scope="col" class="text-center" style="min-width: 100px;">Total picks</th>
|
|
||||||
<th scope="col" class="text-center" style="min-width: 100px;" data-bs-toggle="tooltip" title="Any points count as correct">Correct picks</th>
|
|
||||||
<th scope="col" class="text-center" style="min-width: 100px;">Points per pick</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
<div class="card-body">
|
||||||
{% for user in points.users_sorted_by_points() %}
|
<div class="d-inline-block overflow-x-scroll w-100">
|
||||||
{% set user_standing = points.user_standing()[user.name] %}
|
<table class="table table-bordered table-sm table-responsive">
|
||||||
<tr class="{% if user_standing == 1 %}table-danger{% endif %}">
|
<thead>
|
||||||
<td class="text-center text-nowrap">{{ user_standing }}</td>
|
<tr>
|
||||||
<td class="text-center text-nowrap">{{ user.name }}</td>
|
<th scope="col" class="text-center" style="min-width: 50px;">Place</th>
|
||||||
<td class="text-center text-nowrap">{{ points.total_points_by(user.name) }}</td>
|
<th scope="col" class="text-center" style="min-width: 50px;">User</th>
|
||||||
<td class="text-center text-nowrap">{{ points.picks_count(user.name) }}</td>
|
<th scope="col" class="text-center" style="min-width: 100px;">Points</th>
|
||||||
<td class="text-center text-nowrap">{{ points.picks_with_points_count(user.name) }}</td>
|
<th scope="col" class="text-center" style="min-width: 100px;">Total picks</th>
|
||||||
<td class="text-center text-nowrap">{{ "%0.2f" % points.points_per_pick(user.name) }}</td>
|
<th scope="col" class="text-center" style="min-width: 100px;" data-bs-toggle="tooltip"
|
||||||
|
title="Any points count as correct">Correct picks
|
||||||
|
</th>
|
||||||
|
<th scope="col" class="text-center" style="min-width: 100px;">Points per pick</th>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
</thead>
|
||||||
</tbody>
|
|
||||||
</table>
|
<tbody>
|
||||||
|
{% for user in points.users_sorted_by_points() %}
|
||||||
|
{% set user_standing = points.user_standing()[user.name] %}
|
||||||
|
<tr class="{% if user_standing == 1 %}table-danger{% endif %}">
|
||||||
|
<td class="text-center text-nowrap">{{ user_standing }}</td>
|
||||||
|
<td class="text-center text-nowrap">{{ user.name }}</td>
|
||||||
|
<td class="text-center text-nowrap">{{ points.total_points_by(user.name) }}</td>
|
||||||
|
<td class="text-center text-nowrap">{{ points.picks_count(user.name) }}</td>
|
||||||
|
<td class="text-center text-nowrap">{{ points.picks_with_points_count(user.name) }}</td>
|
||||||
|
<td class="text-center text-nowrap">{{ "%0.2f" % points.points_per_pick(user.name) }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -14,184 +14,191 @@
|
|||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
|
||||||
<table class="table table-bordered table-sm table-responsive shadow-sm">
|
{# Put table in this div to make right padding work #}
|
||||||
<thead>
|
<div class="d-inline-block overflow-x-scroll w-100">
|
||||||
<tr>
|
<table class="table table-bordered table-sm table-responsive shadow-sm">
|
||||||
<th scope="col" rowspan="2" class="text-center" style="width: 125px;">Race</th>
|
|
||||||
|
|
||||||
<th scope="col" {% if model.active_user is none %}colspan="{{ model.all_users() | length }}"{% endif %}
|
<thead>
|
||||||
class="text-center">Call
|
<tr>
|
||||||
</th>
|
<th scope="col" rowspan="2" class="text-center" style="width: 125px;">Race</th>
|
||||||
|
|
||||||
<th scope="col" rowspan="2" class="text-center" style="width: 125px;">Result</th>
|
<th scope="col" {% if model.active_user is none %}colspan="{{ model.all_users() | length }}"{% endif %}
|
||||||
</tr>
|
class="text-center">Call
|
||||||
</thead>
|
</th>
|
||||||
|
|
||||||
<tbody>
|
<th scope="col" rowspan="2" class="text-center" style="width: 125px;">Result</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
{# Users List #}
|
<tbody>
|
||||||
<tr>
|
|
||||||
<td> </td>
|
|
||||||
|
|
||||||
{# Link should only be visible if all users are visible #}
|
{# Users List #}
|
||||||
{% if model.active_user is not none %}
|
<tr>
|
||||||
<td class="text-center text-nowrap" style="min-width: 100px;">{{ model.active_user.name }} ({{ points.total_points_by(model.active_user.name) }})</td>
|
<td> </td>
|
||||||
{% else %}
|
|
||||||
{% for user in model.all_users() %}
|
{# Link should only be visible if all users are visible #}
|
||||||
<td class="text-center text-nowrap" style="min-width: 100px;">
|
{% if model.active_user is not none %}
|
||||||
<a href="/race/{{ user.name_sanitized }}" class="link-dark">{{ user.name }} ({{ points.total_points_by(user.name) }})</a>
|
<td class="text-center text-nowrap" style="min-width: 100px;">{{ model.active_user.name }}
|
||||||
|
({{ points.total_points_by(model.active_user.name) }})
|
||||||
</td>
|
</td>
|
||||||
{% endfor %}
|
{% else %}
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
{# Current Result, only displayed for all users overview and if guess is remaining #}
|
|
||||||
{% if (model.active_user is none) and (model.current_race is not none) %}
|
|
||||||
|
|
||||||
<tr class="table-danger">
|
|
||||||
<td class="text-nowrap">
|
|
||||||
<span class="fw-bold">{{ model.current_race.number }}:</span> {{ model.current_race.name }}<br>
|
|
||||||
<small><span class="fw-bold">Guess:</span> P{{ model.current_race.place_to_guess }}</small><br>
|
|
||||||
<small><span class="fw-bold">Date:</span> {{ model.current_race.date.strftime("%d.%m %H:%M") }}
|
|
||||||
</small>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
{% if model.all_users() | length > 0 %}
|
|
||||||
{% for user in model.all_users() %}
|
{% for user in model.all_users() %}
|
||||||
{% set user_guess = model.race_guesses_by(user_name=user.name, race_name=model.current_race.name) %}
|
<td class="text-center text-nowrap" style="min-width: 100px;">
|
||||||
|
<a href="/race/{{ user.name_sanitized }}" class="link-dark">{{ user.name }}
|
||||||
<td class="text-center text-nowrap">
|
({{ points.total_points_by(user.name) }})</a>
|
||||||
{% if user_guess is not none %}
|
|
||||||
<ul class="list-group list-group-flush">
|
|
||||||
<li class="list-group-item" style="background-color: inherit;">
|
|
||||||
{{ user_guess.pxx_guess.abbr }}
|
|
||||||
</li>
|
|
||||||
<li class="list-group-item" style="background-color: inherit;">
|
|
||||||
{{ user_guess.dnf_guess.abbr }}
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
{% else %}
|
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
</td>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
|
||||||
<td> </td>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{# Race countdown #}
|
|
||||||
<span id="race_date" hidden="hidden">{{ model.current_race.date.strftime("%Y-%m-%dT%H:%M") }}</span>
|
|
||||||
<td class="text-center text-nowrap align-middle">
|
|
||||||
<span class="fw-bold">Race starts in:</span><br>
|
|
||||||
<span id="race_date_countdown">00d 00h 00m 00s</span>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{# Enter Guess, only displayed for single user focused view and if guess is remaining #}
|
|
||||||
{% if (model.active_user is not none) and (model.current_race is not none) %}
|
|
||||||
<tr class="table-danger">
|
|
||||||
<td class="text-nowrap">
|
|
||||||
<span class="fw-bold">{{ model.current_race.number }}:</span> {{ model.current_race.name }}<br>
|
|
||||||
<small><span class="fw-bold">Guess:</span> P{{ model.current_race.place_to_guess }}</small><br>
|
|
||||||
<small><span class="fw-bold">Date:</span> {{ model.current_race.date.strftime("%d.%m %H:%M") }}
|
|
||||||
</small>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td>
|
|
||||||
{% set race_guess_open = model.race_guess_open(model.current_race) %}
|
|
||||||
{% if race_guess_open == true %}
|
|
||||||
{% set action_save_href = "/race-guess/" ~ model.current_race.name_sanitized ~ "/" ~ model.active_user.name_sanitized %}
|
|
||||||
{% set action_delete_href = "/race-guess-delete/" ~ model.current_race.name_sanitized ~ "/" ~ model.active_user.name_sanitized %}
|
|
||||||
{% else %}
|
|
||||||
{% set action_save_href = "" %}
|
|
||||||
{% set action_delete_href = "" %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{# Enter + Save guess #}
|
|
||||||
<form action="{{ action_save_href }}" method="post">
|
|
||||||
{% set user_guess = model.race_guesses_by(user_name=model.active_user.name, race_name=model.current_race.name) %}
|
|
||||||
|
|
||||||
{# Driver PXX Select #}
|
|
||||||
{{ driver_select_with_preselect(driver_match=user_guess.pxx_guess, name="pxxselect", label="P" ~ model.current_race.place_to_guess ~ ":", include_none=true, disabled=not race_guess_open) }}
|
|
||||||
|
|
||||||
<div class="mt-2"></div>
|
|
||||||
|
|
||||||
{# Driver DNF Select #}
|
|
||||||
{{ driver_select_with_preselect(driver_match=user_guess.dnf_guess, name="dnfselect", label="DNF:", include_none=true, disabled=not race_guess_open) }}
|
|
||||||
|
|
||||||
<input type="submit" class="btn btn-danger mt-2 w-100" value="Save"
|
|
||||||
{% if race_guess_open == false %}disabled="disabled"{% endif %}>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
{# Delete guess #}
|
|
||||||
<form action="{{ action_delete_href }}" method="post">
|
|
||||||
<input type="submit" class="btn btn-dark mt-2 w-100" value="Delete"
|
|
||||||
{% if race_guess_open == false %}disabled="disabled"{% endif %}>
|
|
||||||
</form>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{# Past Race Results #}
|
{# Current Result, only displayed for all users overview and if guess is remaining #}
|
||||||
{% for past_result in model.all_race_results() %}
|
{% if (model.active_user is none) and (model.current_race is not none) %}
|
||||||
<tr>
|
|
||||||
<td class="text-nowrap">
|
|
||||||
<span class="fw-bold">{{ past_result.race.number }}:</span> {{ past_result.race.name }}<br>
|
|
||||||
<small><span class="fw-bold">Guessed:</span> P{{ past_result.race.place_to_guess }}</small><br>
|
|
||||||
<small><span class="fw-bold">Date:</span> {{ past_result.race.date.strftime("%d.%m %H:%M") }}
|
|
||||||
</small>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
{% if model.all_users_or_active_user() | length > 0 %}
|
<tr class="table-danger">
|
||||||
{% for user in model.all_users_or_active_user() %}
|
<td class="text-nowrap">
|
||||||
<td class="text-center text-nowrap">
|
<span class="fw-bold">{{ model.current_race.number }}:</span> {{ model.current_race.name }}<br>
|
||||||
{% set user_guess = model.race_guesses_by(user_name=user.name, race_name=past_result.race.name) %}
|
<small><span class="fw-bold">Guess:</span> P{{ model.current_race.place_to_guess }}</small><br>
|
||||||
|
<small><span class="fw-bold">Date:</span> {{ model.current_race.date.strftime("%d.%m %H:%M") }}
|
||||||
|
</small>
|
||||||
|
</td>
|
||||||
|
|
||||||
{% if user_guess is not none %}
|
{% if model.all_users() | length > 0 %}
|
||||||
<ul class="list-group list-group-flush">
|
{% for user in model.all_users() %}
|
||||||
<li class="list-group-item {{ pxx_guess_colorization(guessed_driver=user_guess.pxx_guess, result=past_result) }}">
|
{% set user_guess = model.race_guesses_by(user_name=user.name, race_name=model.current_race.name) %}
|
||||||
|
|
||||||
|
<td class="text-center text-nowrap">
|
||||||
|
{% if user_guess is not none %}
|
||||||
|
<ul class="list-group list-group-flush">
|
||||||
|
<li class="list-group-item" style="background-color: inherit;">
|
||||||
|
{{ user_guess.pxx_guess.abbr }}
|
||||||
|
</li>
|
||||||
|
<li class="list-group-item" style="background-color: inherit;">
|
||||||
|
{{ user_guess.dnf_guess.abbr }}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
{% else %}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
<td> </td>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{# Race countdown #}
|
||||||
|
<span id="race_date" hidden="hidden">{{ model.current_race.date.strftime("%Y-%m-%dT%H:%M") }}</span>
|
||||||
|
<td class="text-center text-nowrap align-middle">
|
||||||
|
<span class="fw-bold">Race starts in:</span><br>
|
||||||
|
<span id="race_date_countdown">00d 00h 00m 00s</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{# Enter Guess, only displayed for single user focused view and if guess is remaining #}
|
||||||
|
{% if (model.active_user is not none) and (model.current_race is not none) %}
|
||||||
|
<tr class="table-danger">
|
||||||
|
<td class="text-nowrap">
|
||||||
|
<span class="fw-bold">{{ model.current_race.number }}:</span> {{ model.current_race.name }}<br>
|
||||||
|
<small><span class="fw-bold">Guess:</span> P{{ model.current_race.place_to_guess }}</small><br>
|
||||||
|
<small><span class="fw-bold">Date:</span> {{ model.current_race.date.strftime("%d.%m %H:%M") }}
|
||||||
|
</small>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
{% set race_guess_open = model.race_guess_open(model.current_race) %}
|
||||||
|
{% if race_guess_open == true %}
|
||||||
|
{% set action_save_href = "/race-guess/" ~ model.current_race.name_sanitized ~ "/" ~ model.active_user.name_sanitized %}
|
||||||
|
{% set action_delete_href = "/race-guess-delete/" ~ model.current_race.name_sanitized ~ "/" ~ model.active_user.name_sanitized %}
|
||||||
|
{% else %}
|
||||||
|
{% set action_save_href = "" %}
|
||||||
|
{% set action_delete_href = "" %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{# Enter + Save guess #}
|
||||||
|
<form action="{{ action_save_href }}" method="post">
|
||||||
|
{% set user_guess = model.race_guesses_by(user_name=model.active_user.name, race_name=model.current_race.name) %}
|
||||||
|
|
||||||
|
{# Driver PXX Select #}
|
||||||
|
{{ driver_select_with_preselect(driver_match=user_guess.pxx_guess, name="pxxselect", label="P" ~ model.current_race.place_to_guess ~ ":", include_none=true, disabled=not race_guess_open) }}
|
||||||
|
|
||||||
|
<div class="mt-2"></div>
|
||||||
|
|
||||||
|
{# Driver DNF Select #}
|
||||||
|
{{ driver_select_with_preselect(driver_match=user_guess.dnf_guess, name="dnfselect", label="DNF:", include_none=true, disabled=not race_guess_open) }}
|
||||||
|
|
||||||
|
<input type="submit" class="btn btn-danger mt-2 w-100" value="Save"
|
||||||
|
{% if race_guess_open == false %}disabled="disabled"{% endif %}>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
{# Delete guess #}
|
||||||
|
<form action="{{ action_delete_href }}" method="post">
|
||||||
|
<input type="submit" class="btn btn-dark mt-2 w-100" value="Delete"
|
||||||
|
{% if race_guess_open == false %}disabled="disabled"{% endif %}>
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{# Past Race Results #}
|
||||||
|
{% for past_result in model.all_race_results() %}
|
||||||
|
<tr>
|
||||||
|
<td class="text-nowrap">
|
||||||
|
<span class="fw-bold">{{ past_result.race.number }}:</span> {{ past_result.race.name }}<br>
|
||||||
|
<small><span class="fw-bold">Guessed:</span> P{{ past_result.race.place_to_guess }}</small><br>
|
||||||
|
<small><span class="fw-bold">Date:</span> {{ past_result.race.date.strftime("%d.%m %H:%M") }}
|
||||||
|
</small>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
{% if model.all_users_or_active_user() | length > 0 %}
|
||||||
|
{% for user in model.all_users_or_active_user() %}
|
||||||
|
<td class="text-center text-nowrap">
|
||||||
|
{% set user_guess = model.race_guesses_by(user_name=user.name, race_name=past_result.race.name) %}
|
||||||
|
|
||||||
|
{% if user_guess is not none %}
|
||||||
|
<ul class="list-group list-group-flush">
|
||||||
|
<li class="list-group-item {{ pxx_guess_colorization(guessed_driver=user_guess.pxx_guess, result=past_result) }}">
|
||||||
<span data-bs-toggle="tooltip"
|
<span data-bs-toggle="tooltip"
|
||||||
title="{{ past_result.driver_standing_points_string(user_guess.pxx_guess) }}">
|
title="{{ past_result.driver_standing_points_string(user_guess.pxx_guess) }}">
|
||||||
{{ user_guess.pxx_guess.abbr ~ past_result.driver_standing_position_string(user_guess.pxx_guess) }}
|
{{ user_guess.pxx_guess.abbr ~ past_result.driver_standing_position_string(user_guess.pxx_guess) }}
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item {{ dnf_guess_colorization(guessed_driver=user_guess.dnf_guess, result=past_result) }}">
|
<li class="list-group-item {{ dnf_guess_colorization(guessed_driver=user_guess.dnf_guess, result=past_result) }}">
|
||||||
<span data-bs-toggle="tooltip"
|
<span data-bs-toggle="tooltip"
|
||||||
title="{{ past_result.driver_dnf_points_string(user_guess.dnf_guess) }}">
|
title="{{ past_result.driver_dnf_points_string(user_guess.dnf_guess) }}">
|
||||||
{{ user_guess.dnf_guess.abbr }}
|
{{ user_guess.dnf_guess.abbr }}
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<td> </td>
|
<td> </td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{# Actual result #}
|
{# Actual result #}
|
||||||
<td class="text-center text-nowrap">
|
<td class="text-center text-nowrap">
|
||||||
<ul class="list-group list-group-flush">
|
<ul class="list-group list-group-flush">
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<span data-bs-toggle="tooltip" title="{{ pxx_standing_tooltip_text(result=past_result) }}">
|
<span data-bs-toggle="tooltip" title="{{ pxx_standing_tooltip_text(result=past_result) }}">
|
||||||
P{{ past_result.race.place_to_guess }}: {{ past_result.offset_from_place_to_guess(0).abbr }}
|
P{{ past_result.race.place_to_guess }}: {{ past_result.offset_from_place_to_guess(0).abbr }}
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
DNF: {{ past_result.initial_dnf_string() }}</li>
|
DNF: {{ past_result.initial_dnf_string() }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% endblock body %}
|
{% endblock body %}
|
@ -42,80 +42,86 @@
|
|||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
|
||||||
<div class="grid" style="grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));">
|
<div class="grid" style="grid-template-columns: repeat(auto-fit, minmax(325px, 1fr)); grid-row-gap: 0; grid-column-gap: 8px;">
|
||||||
|
|
||||||
|
<div class="card shadow-sm mb-2" style="max-width: 450px;">
|
||||||
|
<div class="card-header">
|
||||||
|
{{ model.active_result_race_name_or_current_race_name() }}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="card shadow-sm" style="width: 450px;">
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
<div class="d-inline-block overflow-x-scroll w-100">
|
||||||
|
<div style="width: 410px;">
|
||||||
|
{% set race_result_open=model.race_result_open(model.active_result_race_name_or_current_race_name()) %}
|
||||||
|
{% if race_result_open == true %}
|
||||||
|
{% set action_save_href = "/result-enter/" ~ model.active_result_race_name_or_current_race_name_sanitized() %}
|
||||||
|
{% else %}
|
||||||
|
{% set action_save_href = "" %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<h5 class="card-title">
|
<form action="{{ action_save_href }}" method="post">
|
||||||
{{ model.active_result_race_name_or_current_race_name() }}
|
<ul class="list-group list-group-flush d-inline-block">
|
||||||
</h5>
|
{% for driver in model.all_drivers_or_active_result_standing_drivers() %}
|
||||||
|
<li class="list-group-item p-1"><span id="place_number"
|
||||||
|
class="fw-bold">P{{ "%02d" % loop.index }}</span>:
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
|
||||||
{% set race_result_open=model.race_result_open(model.active_result_race_name_or_current_race_name()) %}
|
<ul id="columns" class="list-group list-group-flush d-inline-block float-end">
|
||||||
{% if race_result_open == true %}
|
|
||||||
{% set action_save_href = "/result-enter/" ~ model.active_result_race_name_or_current_race_name_sanitized() %}
|
|
||||||
{% else %}
|
|
||||||
{% set action_save_href = "" %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<form action="{{ action_save_href }}" method="post">
|
{% for driver in model.all_drivers_or_active_result_standing_drivers() %}
|
||||||
<ul class="list-group list-group-flush d-inline-block">
|
<li class="list-group-item {% if race_result_open == true %}column{% endif %} p-1"
|
||||||
{% for driver in model.all_drivers_or_active_result_standing_drivers() %}
|
{% if race_result_open == true %}draggable="true"{% endif %}>
|
||||||
<li class="list-group-item p-1"><span id="place_number"
|
{{ driver.name }}
|
||||||
class="fw-bold">P{{ "%02d" % loop.index }}</span>:
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<ul id="columns" class="list-group list-group-flush d-inline-block float-end">
|
<div class="d-inline-block float-end" style="margin-left: 30px;">
|
||||||
|
{# Driver DNFed at first #}
|
||||||
|
<div class="form-check form-check-reverse d-inline-block">
|
||||||
|
<input type="checkbox" class="form-check-input"
|
||||||
|
value="{{ driver.name }}"
|
||||||
|
id="first-dnf-{{ driver.name }}" name="first-dnf-drivers"
|
||||||
|
{% if (model.active_result is not none) and (driver in model.active_result.initial_dnf) %}checked{% endif %}
|
||||||
|
{% if race_result_open == false %}readonly="readonly"{% endif %}>
|
||||||
|
<label for="first-dnf-{{ driver.name }}"
|
||||||
|
class="form-check-label text-muted">1. DNF</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% for driver in model.all_drivers_or_active_result_standing_drivers() %}
|
{# Driver DNFed #}
|
||||||
<li class="list-group-item {% if race_result_open == true %}column{% endif %} p-1" {% if race_result_open == true %}draggable="true"{% endif %}>
|
<div class="form-check form-check-reverse d-inline-block mx-2">
|
||||||
{{ driver.name }}
|
<input type="checkbox" class="form-check-input"
|
||||||
|
value="{{ driver.name }}"
|
||||||
|
id="dnf-{{ driver.name }}" name="dnf-drivers"
|
||||||
|
{% if (model.active_result is not none) and (driver in model.active_result.all_dnfs) %}checked{% endif %}
|
||||||
|
{% if race_result_open == false %}readonly="readonly"{% endif %}>
|
||||||
|
<label for="dnf-{{ driver.name }}"
|
||||||
|
class="form-check-label text-muted">DNF</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="d-inline-block float-end" style="margin-left: 30px;">
|
{# Driver Excluded #}
|
||||||
{# Driver DNFed at first #}
|
<div class="form-check form-check-reverse d-inline-block">
|
||||||
<div class="form-check form-check-reverse d-inline-block">
|
<input type="checkbox" class="form-check-input"
|
||||||
<input type="checkbox" class="form-check-input" value="{{ driver.name }}"
|
value="{{ driver.name }}"
|
||||||
id="first-dnf-{{ driver.name }}" name="first-dnf-drivers"
|
id="exclude-{{ driver.name }}" name="excluded-drivers"
|
||||||
{% if (model.active_result is not none) and (driver in model.active_result.initial_dnf) %}checked{% endif %}
|
{% if (model.active_result is not none) and (driver in model.active_result.standing_exclusions) %}checked{% endif %}
|
||||||
{% if race_result_open == false %}readonly="readonly"{% endif %}>
|
{% if race_result_open == false %}readonly="readonly"{% endif %}>
|
||||||
<label for="first-dnf-{{ driver.name }}"
|
<label for="exclude-{{ driver.name }}"
|
||||||
class="form-check-label text-muted">1. DNF</label>
|
class="form-check-label text-muted" data-bs-toggle="tooltip"
|
||||||
</div>
|
title="Driver is not counted for standing">NC</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{# Driver DNFed #}
|
{# Standing order #}
|
||||||
<div class="form-check form-check-reverse d-inline-block mx-2">
|
<input type="hidden" name="pxx-drivers" value="{{ driver.name }}">
|
||||||
<input type="checkbox" class="form-check-input" value="{{ driver.name }}"
|
</li>
|
||||||
id="dnf-{{ driver.name }}" name="dnf-drivers"
|
{% endfor %}
|
||||||
{% if (model.active_result is not none) and (driver in model.active_result.all_dnfs) %}checked{% endif %}
|
</ul>
|
||||||
{% if race_result_open == false %}readonly="readonly"{% endif %}>
|
|
||||||
<label for="dnf-{{ driver.name }}"
|
|
||||||
class="form-check-label text-muted">DNF</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{# Driver Excluded #}
|
|
||||||
<div class="form-check form-check-reverse d-inline-block">
|
|
||||||
<input type="checkbox" class="form-check-input" value="{{ driver.name }}"
|
|
||||||
id="exclude-{{ driver.name }}" name="excluded-drivers"
|
|
||||||
{% if (model.active_result is not none) and (driver in model.active_result.standing_exclusions) %}checked{% endif %}
|
|
||||||
{% if race_result_open == false %}readonly="readonly"{% endif %}>
|
|
||||||
<label for="exclude-{{ driver.name }}"
|
|
||||||
class="form-check-label text-muted" data-bs-toggle="tooltip"
|
|
||||||
title="Driver is not counted for standing">NC</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{# Standing order #}
|
|
||||||
<input type="hidden" name="pxx-drivers" value="{{ driver.name }}">
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<input type="submit" class="btn btn-danger mt-2 w-100" value="Save"
|
|
||||||
{% if race_result_open == false %}disabled="disabled"{% endif %}>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
|
<input type="submit" class="btn btn-danger mt-2 w-100" value="Save"
|
||||||
|
{% if race_result_open == false %}disabled="disabled"{% endif %}>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -5,10 +5,12 @@
|
|||||||
{% set active_page = "/rules" %}
|
{% set active_page = "/rules" %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<div class="card">
|
<div class="card mb-2">
|
||||||
<div class="card-body">
|
<div class="card-header">
|
||||||
<h5 class="card-title">Format</h5>
|
Format
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
<p>
|
<p>
|
||||||
Das Tippspiel wird dieses Jahr in zwei Teile aufgespalten: Renntips (für jedes Rennen) und Bonustipps
|
Das Tippspiel wird dieses Jahr in zwei Teile aufgespalten: Renntips (für jedes Rennen) und Bonustipps
|
||||||
(für die ganze Saison).
|
(für die ganze Saison).
|
||||||
@ -20,10 +22,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card mt-2">
|
<div class="card mb-2">
|
||||||
<div class="card-body">
|
<div class="card-header">
|
||||||
<h5 class="card-title">Renntipps</h5>
|
Renntipps
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
<p>
|
<p>
|
||||||
Jedes Rennen besteht aus zwei Tipps.
|
Jedes Rennen besteht aus zwei Tipps.
|
||||||
Einem Platzierungstipp (PX-Tipp) und einem Tipp welcher Fahrer als Erstes das Rennen abbricht
|
Einem Platzierungstipp (PX-Tipp) und einem Tipp welcher Fahrer als Erstes das Rennen abbricht
|
||||||
@ -39,10 +43,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card mt-2">
|
<div class="card mb-2">
|
||||||
<div class="card-body">
|
<div class="card-header">
|
||||||
<h5 class="card-title">Punkte</h5>
|
Punkte
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
<p>
|
<p>
|
||||||
Für einen korrekten Tipp werden 10 Punkte vergeben.
|
Für einen korrekten Tipp werden 10 Punkte vergeben.
|
||||||
Beim PX-Tipp werden 6 Punkte für einen Platz Abweichung, 3 Punkte für zwei plätze Abweichung und 1 Punkt
|
Beim PX-Tipp werden 6 Punkte für einen Platz Abweichung, 3 Punkte für zwei plätze Abweichung und 1 Punkt
|
||||||
@ -56,10 +62,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card mt-2">
|
<div class="card mb-2">
|
||||||
<div class="card-body">
|
<div class="card-header">
|
||||||
<h5 class="card-title">Bonustipps</h5>
|
Bonustipps
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
<p>
|
<p>
|
||||||
Zusätzlich gibt es dieses Jahr auch Tipps, die sich auf die ganze Saison beziehen und verschieden
|
Zusätzlich gibt es dieses Jahr auch Tipps, die sich auf die ganze Saison beziehen und verschieden
|
||||||
bepunktet werden.
|
bepunktet werden.
|
||||||
|
@ -11,28 +11,32 @@
|
|||||||
{% block body %}
|
{% block body %}
|
||||||
|
|
||||||
<div class="card mb-2">
|
<div class="card mb-2">
|
||||||
|
<div class="card-header">
|
||||||
|
Note
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title">Note</h5>
|
Picks that match the current standings are marked in green, except for the hot-take and overtake picks, as
|
||||||
Picks that match the current standings are marked in green, except for the hot-take and overtake picks, as those are not evaluated automatically.<br>
|
those are not evaluated automatically.<br>
|
||||||
Points from sprints and fastest laps are not tracked currently.
|
Points from sprints and fastest laps are not tracked currently.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid" style="grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));">
|
<div class="grid" style="grid-template-columns: repeat(auto-fit, minmax(325px, 1fr)); grid-row-gap: 0; grid-column-gap: 8px;">
|
||||||
|
|
||||||
{% for user in model.all_users_or_active_user() %}
|
{% for user in model.all_users_or_active_user() %}
|
||||||
|
|
||||||
<div class="card mb-2 shadow-sm">
|
<div class="card mb-2 shadow-sm">
|
||||||
<div class="card-body">
|
<div class="card-header">
|
||||||
|
|
||||||
{# Link should only be visible if all users are visible #}
|
{# Link should only be visible if all users are visible #}
|
||||||
{% if model.active_user is not none %}
|
{% if model.active_user is not none %}
|
||||||
<h5 class="card-title">{{ user.name }}</h5>
|
{{ user.name }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="/season/{{ user.name }}" class="link-dark">
|
<a href="/season/{{ user.name }}" class="link-dark">{{ user.name }}</a>
|
||||||
<h5 class="card-title">{{ user.name }}</h5>
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
{% set user_guess = model.season_guesses_by(user_name=user.name) %}
|
{% set user_guess = model.season_guesses_by(user_name=user.name) %}
|
||||||
|
|
||||||
@ -78,11 +82,11 @@
|
|||||||
<div class="input-group mt-2" data-bs-toggle="tooltip"
|
<div class="input-group mt-2" data-bs-toggle="tooltip"
|
||||||
title="Which driver will gain/lose the most places in comparison to last season's results?">
|
title="Which driver will gain/lose the most places in comparison to last season's results?">
|
||||||
{{ driver_select_with_preselect(driver_match=user_guess.most_wdc_gained, name="gainedselect",
|
{{ driver_select_with_preselect(driver_match=user_guess.most_wdc_gained, name="gainedselect",
|
||||||
label="Most WDC places gained:", include_none=false, drivers=model.drivers_for_wdc_gained(),
|
label="Most WDC pl. gained:", include_none=false, drivers=model.drivers_for_wdc_gained(),
|
||||||
disabled=not season_guess_open,
|
disabled=not season_guess_open,
|
||||||
border=("border-success" if points.most_gained_correct(user.name) else "")) }}
|
border=("border-success" if points.most_gained_correct(user.name) else "")) }}
|
||||||
{{ driver_select_with_preselect(driver_match=user_guess.most_wdc_lost, name="lostselect",
|
{{ driver_select_with_preselect(driver_match=user_guess.most_wdc_lost, name="lostselect",
|
||||||
label="Most WDC places lost:", include_none=false, disabled=not season_guess_open,
|
label="Most WDC pl. lost:", include_none=false, disabled=not season_guess_open,
|
||||||
border=("border-success" if points.most_lost_correct(user.name) else "")) }}
|
border=("border-success" if points.most_lost_correct(user.name) else "")) }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -90,7 +94,7 @@
|
|||||||
<h6 class="card-subtitle mt-2" data-bs-toggle="tooltip"
|
<h6 class="card-subtitle mt-2" data-bs-toggle="tooltip"
|
||||||
title="Which driver will finish the season higher than his teammate?">Teammate battle
|
title="Which driver will finish the season higher than his teammate?">Teammate battle
|
||||||
winners:</h6>
|
winners:</h6>
|
||||||
<div class="grid mt-2" style="width: 450px; row-gap: 0;">
|
<div class="grid mt-2 container" style="row-gap: 0;">
|
||||||
{% for team in model.all_teams(include_none=false) %}
|
{% for team in model.all_teams(include_none=false) %}
|
||||||
{% set driver_a = model.drivers_by(team_name=team.name)[0] %}
|
{% set driver_a = model.drivers_by(team_name=team.name)[0] %}
|
||||||
{% set driver_b = model.drivers_by(team_name=team.name)[1] %}
|
{% set driver_b = model.drivers_by(team_name=team.name)[1] %}
|
||||||
@ -126,7 +130,7 @@
|
|||||||
{# Drivers with Podiums #}
|
{# Drivers with Podiums #}
|
||||||
<h6 class="card-subtitle mt-2" data-bs-toggle="tooltip"
|
<h6 class="card-subtitle mt-2" data-bs-toggle="tooltip"
|
||||||
title="Which driver will reach at least a single podium?">Drivers with podium(s):</h6>
|
title="Which driver will reach at least a single podium?">Drivers with podium(s):</h6>
|
||||||
<div class="grid mt-2" style="width: 450px; row-gap: 0;">
|
<div class="grid mt-2 container" style="row-gap: 0;">
|
||||||
{% for team in model.all_teams(include_none=false) %}
|
{% for team in model.all_teams(include_none=false) %}
|
||||||
{% set driver_a = model.drivers_by(team_name=team.name)[0] %}
|
{% set driver_a = model.drivers_by(team_name=team.name)[0] %}
|
||||||
{% set driver_b = model.drivers_by(team_name=team.name)[1] %}
|
{% set driver_b = model.drivers_by(team_name=team.name)[1] %}
|
||||||
|
@ -7,67 +7,78 @@
|
|||||||
{% block body %}
|
{% block body %}
|
||||||
|
|
||||||
<div class="card mb-2">
|
<div class="card mb-2">
|
||||||
|
<div class="card-header">
|
||||||
|
Note
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title">Note</h5>
|
|
||||||
Points from sprints and fastest laps are not tracked currently.
|
Points from sprints and fastest laps are not tracked currently.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid" style="grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));">
|
<div class="grid" style="grid-template-columns: repeat(auto-fit, minmax(325px, 1fr)); grid-row-gap: 0; grid-column-gap: 8px;">
|
||||||
|
|
||||||
<div class="card mb-2">
|
<div class="card mb-2">
|
||||||
|
<div class="card-header">
|
||||||
|
Drivers
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title">Drivers</h5>
|
<div class="d-inline-block overflow-x-scroll w-100">
|
||||||
|
<table class="table table-bordered table-sm table-responsive">
|
||||||
<table class="table table-bordered table-sm table-responsive">
|
<thead>
|
||||||
<thead>
|
<tr>
|
||||||
<tr>
|
<th scope="col" class="text-center" style="min-width: 50px;">Place</th>
|
||||||
<th scope="col" class="text-center" style="min-width: 50px;">Place</th>
|
<th scope="col" class="text-center" style="min-width: 50px;">Driver</th>
|
||||||
<th scope="col" class="text-center" style="min-width: 50px;">Driver</th>
|
<th scope="col" class="text-center" style="min-width: 100px;">Points</th>
|
||||||
<th scope="col" class="text-center" style="min-width: 100px;">Points</th>
|
<th scope="col" class="text-center" style="min-width: 100px;">DNFs</th>
|
||||||
<th scope="col" class="text-center" style="min-width: 100px;">DNFs</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
{% for driver in points.drivers_sorted_by_points() %}
|
|
||||||
{% set driver_standing = points.wdc_standing_by_driver()[driver.name] %}
|
|
||||||
<tr class="{% if driver_standing == 1 %}table-danger{% endif %}">
|
|
||||||
<td class="text-center text-nowrap">{{ driver_standing }}</td>
|
|
||||||
<td class="text-center text-nowrap">{{ driver.name }}</td>
|
|
||||||
<td class="text-center text-nowrap">{{ points.wdc_points()[driver.name] }}</td>
|
|
||||||
<td class="text-center text-nowrap">{{ points.dnfs()[driver.name] }}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
</thead>
|
||||||
</tbody>
|
|
||||||
</table>
|
<tbody>
|
||||||
|
{% for driver in points.drivers_sorted_by_points() %}
|
||||||
|
{% set driver_standing = points.wdc_standing_by_driver()[driver.name] %}
|
||||||
|
<tr class="{% if driver_standing == 1 %}table-danger{% endif %}">
|
||||||
|
<td class="text-center text-nowrap">{{ driver_standing }}</td>
|
||||||
|
<td class="text-center text-nowrap">{{ driver.name }}</td>
|
||||||
|
<td class="text-center text-nowrap">{{ points.wdc_points()[driver.name] }}</td>
|
||||||
|
<td class="text-center text-nowrap">{{ points.dnfs()[driver.name] }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card">
|
<div class="card mb-2">
|
||||||
|
<div class="card-header">
|
||||||
|
Constructors
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title">Constructors</h5>
|
<div class="d-inline-block overflow-x-scroll w-100">
|
||||||
|
<table class="table table-bordered table-sm table-responsive">
|
||||||
<table class="table table-bordered table-sm table-responsive">
|
<thead>
|
||||||
<thead>
|
<tr>
|
||||||
<tr>
|
<th scope="col" class="text-center" style="min-width: 50px;">Place</th>
|
||||||
<th scope="col" class="text-center" style="min-width: 50px;">Place</th>
|
<th scope="col" class="text-center" style="min-width: 50px;">Team</th>
|
||||||
<th scope="col" class="text-center" style="min-width: 50px;">Team</th>
|
<th scope="col" class="text-center" style="min-width: 100px;">Points</th>
|
||||||
<th scope="col" class="text-center" style="min-width: 100px;">Points</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
{% for team in points.teams_sorted_by_points() %}
|
|
||||||
{% set team_standing = points.wcc_standing_by_team()[team.name] %}
|
|
||||||
<tr class="{% if team_standing == 1 %}table-danger{% endif %}">
|
|
||||||
<td class="text-center text-nowrap">{{ team_standing }}</td>
|
|
||||||
<td class="text-center text-nowrap">{{ team.name }}</td>
|
|
||||||
<td class="text-center text-nowrap">{{ points.wcc_points()[team.name] }}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
</thead>
|
||||||
</tbody>
|
|
||||||
</table>
|
<tbody>
|
||||||
|
{% for team in points.teams_sorted_by_points() %}
|
||||||
|
{% set team_standing = points.wcc_standing_by_team()[team.name] %}
|
||||||
|
<tr class="{% if team_standing == 1 %}table-danger{% endif %}">
|
||||||
|
<td class="text-center text-nowrap">{{ team_standing }}</td>
|
||||||
|
<td class="text-center text-nowrap">{{ team.name }}</td>
|
||||||
|
<td class="text-center text-nowrap">{{ points.wcc_points()[team.name] }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -7,9 +7,11 @@
|
|||||||
{% block body %}
|
{% block body %}
|
||||||
|
|
||||||
<div class="card shadow-sm">
|
<div class="card shadow-sm">
|
||||||
<div class="card-body">
|
<div class="card-header">
|
||||||
<h5 class="card-title">Add User</h5>
|
Add user
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
<form action="/user-add" method="post">
|
<form action="/user-add" method="post">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="form-floating">
|
<div class="form-floating">
|
||||||
@ -26,9 +28,11 @@
|
|||||||
|
|
||||||
{% if model.all_users() | length > 0 %}
|
{% if model.all_users() | length > 0 %}
|
||||||
<div class="card mt-2 shadow-sm">
|
<div class="card mt-2 shadow-sm">
|
||||||
<div class="card-body">
|
<div class="card-header">
|
||||||
<h5 class="card-title">Registered Users</h5>
|
Registered users
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
<ul class="list-group list-group-flush">
|
<ul class="list-group list-group-flush">
|
||||||
{% for user in model.all_users() %}
|
{% for user in model.all_users() %}
|
||||||
<li class="list-group-item">{{ user.name }}</li>
|
<li class="list-group-item">{{ user.name }}</li>
|
||||||
@ -38,9 +42,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card mt-2 shadow-sm">
|
<div class="card mt-2 shadow-sm">
|
||||||
<div class="card-body">
|
<div class="card-header">
|
||||||
<h5 class="card-title">Delete user</h5>
|
Delete user
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-body">
|
||||||
<form action="/user-delete" method="post">
|
<form action="/user-delete" method="post">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<select class="form-control form-select" aria-label="select-delete-user"
|
<select class="form-control form-select" aria-label="select-delete-user"
|
||||||
|
Reference in New Issue
Block a user