diff --git a/formula10/templates/leaderboard.jinja b/formula10/templates/leaderboard.jinja index 904f983..863fd51 100644 --- a/formula10/templates/leaderboard.jinja +++ b/formula10/templates/leaderboard.jinja @@ -7,36 +7,51 @@ {% block body %}
Place | -User | -Points | -Total picks | -Correct picks | -Points per pick | -||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{ user_standing }} | -{{ user.name }} | -{{ points.total_points_by(user.name) }} | -{{ points.picks_count(user.name) }} | -{{ points.picks_with_points_count(user.name) }} | -{{ "%0.2f" % points.points_per_pick(user.name) }} | +
Place | +User | +Points | +Total picks | +Correct picks + | +Points per pick |
---|
Race | + {# Put table in this div to make right padding work #} +
---|
Call - | + +|||||
---|---|---|---|---|---|
Race | -Result | -Call + | - +Result | + + - {# Users List #} -||
+ | {{ model.active_user.name }} ({{ points.total_points_by(model.active_user.name) }}) | - {% else %} - {% for user in model.all_users() %} -- {{ user.name }} ({{ points.total_points_by(user.name) }}) + {# Users List #} + | |||
+ + {# Link should only be visible if all users are visible #} + {% if model.active_user is not none %} + | {{ model.active_user.name }} + ({{ points.total_points_by(model.active_user.name) }}) | - {% endfor %} - {% endif %} - -- | |||
- {{ model.current_race.number }}: {{ model.current_race.name }} - Guess: P{{ model.current_race.place_to_guess }} - Date: {{ model.current_race.date.strftime("%d.%m %H:%M") }} - - |
-
- {% if model.all_users() | length > 0 %}
+ {% else %}
{% for user in model.all_users() %}
- {% set user_guess = model.race_guesses_by(user_name=user.name, race_name=model.current_race.name) %}
-
-
- {% if user_guess is not none %}
-
| + {{ user.name }} + ({{ points.total_points_by(user.name) }}) | {% endfor %} - {% else %} -{% endif %} - {# Race countdown #} - {{ model.current_race.date.strftime("%Y-%m-%dT%H:%M") }} - |
- Race starts in: - 00d 00h 00m 00s - |
- |
- {{ model.current_race.number }}: {{ model.current_race.name }} - Guess: P{{ model.current_race.place_to_guess }} - Date: {{ model.current_race.date.strftime("%d.%m %H:%M") }} - - |
-
- - {% 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 #} - - - {# Delete guess #} - - | -||||
- {{ past_result.race.number }}: {{ past_result.race.name }} - Guessed: P{{ past_result.race.place_to_guess }} - Date: {{ past_result.race.date.strftime("%d.%m %H:%M") }} - - |
+ {# 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) %}
- {% if model.all_users_or_active_user() | length > 0 %}
- {% for user in model.all_users_or_active_user() %}
- - {% set user_guess = model.race_guesses_by(user_name=user.name, race_name=past_result.race.name) %} + | ||||
+ {{ model.current_race.number }}: {{ model.current_race.name }} + Guess: P{{ model.current_race.place_to_guess }} + Date: {{ model.current_race.date.strftime("%d.%m %H:%M") }} + + |
- {% if user_guess is not none %}
-
+ {% if user_guess is not none %}
+
|
+ {% endfor %}
+ {% else %}
+ + {% endif %} + + {# Race countdown #} + {{ model.current_race.date.strftime("%Y-%m-%dT%H:%M") }} + |
+ Race starts in: + 00d 00h 00m 00s + |
+ ||
+ {{ model.current_race.number }}: {{ model.current_race.name }} + Guess: P{{ model.current_race.place_to_guess }} + Date: {{ model.current_race.date.strftime("%d.%m %H:%M") }} + + |
+
+ + {% 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 #} + + + {# Delete guess #} + + | + ++ | |||
+ {{ past_result.race.number }}: {{ past_result.race.name }} + Guessed: P{{ past_result.race.place_to_guess }} + Date: {{ past_result.race.date.strftime("%d.%m %H:%M") }} + + |
+
+ {% if model.all_users_or_active_user() | length > 0 %}
+ {% for user in model.all_users_or_active_user() %}
+
+ {% set user_guess = model.race_guesses_by(user_name=user.name, race_name=past_result.race.name) %}
+
+ {% if user_guess is not none %}
+
|
- {% endfor %}
- {% else %}
- - {% endif %} + + + {% else %} + + {% endif %} + + {% endfor %} + {% else %} + | + {% endif %} - {# Actual result #} - |
-
|
Das Tippspiel wird dieses Jahr in zwei Teile aufgespalten: Renntips (für jedes Rennen) und Bonustipps (für die ganze Saison). @@ -20,10 +22,12 @@
Jedes Rennen besteht aus zwei Tipps. Einem Platzierungstipp (PX-Tipp) und einem Tipp welcher Fahrer als Erstes das Rennen abbricht @@ -39,10 +43,12 @@
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 @@ -56,10 +62,12 @@
Zusätzlich gibt es dieses Jahr auch Tipps, die sich auf die ganze Saison beziehen und verschieden bepunktet werden. diff --git a/formula10/templates/season.jinja b/formula10/templates/season.jinja index 4ad761c..e05a9fa 100644 --- a/formula10/templates/season.jinja +++ b/formula10/templates/season.jinja @@ -11,28 +11,32 @@ {% block body %}
Place | -Driver | -Points | -DNFs | -||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
{{ driver_standing }} | -{{ driver.name }} | -{{ points.wdc_points()[driver.name] }} | -{{ points.dnfs()[driver.name] }} | +
Place | +Driver | +Points | +DNFs |
---|
Place | -Team | -Points | -||||||
---|---|---|---|---|---|---|---|---|
{{ team_standing }} | -{{ team.name }} | -{{ points.wcc_points()[team.name] }} | +
Place | +Team | +Points |
---|