Hide some elements if no guess remains
All checks were successful
Build Formula10 Docker Image / build-docker (push) Successful in 32s
All checks were successful
Build Formula10 Docker Image / build-docker (push) Successful in 32s
This commit is contained in:
@ -14,6 +14,7 @@ db.init_app(app)
|
||||
# TODO
|
||||
# General
|
||||
|
||||
# - Sanitize URLs
|
||||
# - A lot of validation (esp. in the model), each input should be checked...
|
||||
|
||||
# - Show cards of previous race results, like with season guesses?
|
||||
|
@ -20,17 +20,21 @@
|
||||
aria-expanded="false">
|
||||
{% if active_result is not none %}
|
||||
{{ active_result.race.name }}
|
||||
{% else %}
|
||||
{% elif current_race is not none %}
|
||||
{{ current_race.name }}
|
||||
{% else %}
|
||||
{{ model.all_race_results()[0].race.name }}
|
||||
{% endif %}
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a class="dropdown-item" href="/result/{{ current_race.name }}">{{ current_race.name }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<hr class="dropdown-divider">
|
||||
</li>
|
||||
{% if model.first_race_without_result() is not none %}
|
||||
<li>
|
||||
<a class="dropdown-item" href="/result/{{ current_race.name }}">{{ current_race.name }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<hr class="dropdown-divider">
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% for result in model.all_race_results() %}
|
||||
<li>
|
||||
@ -51,11 +55,21 @@
|
||||
<div class="card shadow-sm" style="width: 450px;">
|
||||
<div class="card-body">
|
||||
|
||||
<h5 class="card-title">{% if active_result is not none %}{{ active_result.race.name }}{% else %}
|
||||
{{ current_race.name }}{% endif %}</h5>
|
||||
<h5 class="card-title">
|
||||
{% if active_result is not none %}
|
||||
{{ active_result.race.name }}
|
||||
{% elif current_race is not none %}
|
||||
{{ current_race.name }}
|
||||
{% else %}
|
||||
{{ model.all_race_results()[0].race.name }}
|
||||
{% endif %}
|
||||
</h5>
|
||||
|
||||
<form action="/result-enter/
|
||||
|
||||
|
||||
|
||||
|
||||
{%- if active_result is not none %}{{ active_result.race.name }}{% else %}{{ current_race.name }}{% endif %}"
|
||||
method="post">
|
||||
<ul id="columns" class="list-group list-group-flush">
|
||||
|
@ -73,8 +73,8 @@
|
||||
|
||||
{% set current_race = model.first_race_without_result() %}
|
||||
|
||||
{# Current Result, only displayed for all users overview #}
|
||||
{% if active_user is none %}
|
||||
{# Current Result, only displayed for all users overview and if guess is remaining #}
|
||||
{% if (active_user is none) and (model.first_race_without_result() is not none) %}
|
||||
|
||||
<tr class="table-danger">
|
||||
<td class="text-nowrap">
|
||||
@ -106,8 +106,8 @@
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{# Enter Guess, only displayed for single user focused view #}
|
||||
{% if active_user is not none %}
|
||||
{# Enter Guess, only displayed for single user focused view and if guess is remaining #}
|
||||
{% if (active_user is not none) and (model.first_race_without_result() is not none) %}
|
||||
<tr class="table-danger">
|
||||
<td class="text-nowrap">
|
||||
<span class="fw-bold">{{ current_race.number }}:</span> {{ current_race.name }}<br>
|
||||
|
Reference in New Issue
Block a user