Make user names clickable to reach specific pages
Build Formula10 Docker Image / build-docker (push) Successful in 45s

This commit is contained in:
2024-02-19 10:04:49 +01:00
parent d0c7ba242c
commit a5a57e16fa
3 changed files with 7 additions and 4 deletions
-2
View File
@@ -1,7 +1,6 @@
from typing import List
from flask import Flask, render_template, request, redirect
from flask_sqlalchemy import SQLAlchemy
from model import *
from database_utils import reload_static_data, reload_dynamic_data, export_dynamic_data
@@ -15,7 +14,6 @@ db.init_app(app)
# TODO
# General
# - Store standing/dnf orders as dicts, since lists lose their order
# - Make user headers in race table clickable, to reach the specific page. Do the same for the season cards
# - When showing correct guesses in green, show semi-correct ones in a weaker tone (probably need to prepare those here, instead of in the template)
# - Also show previous race results, and allow to change them. Or at least, allow editing the current one and show current state (do it like the activeuser select for results)
+1 -1
View File
@@ -48,7 +48,7 @@
{% if activeuser is none %}
{% for user in users %}
<td class="text-center text-nowrap" style="min-width: 100px;">{{ user.name }}</td>
<td class="text-center text-nowrap" style="min-width: 100px;"><a href="/race/{{ user.name }}" class="link-dark">{{ user.name }}</a></td>
{% endfor %}
{% else %}
<td class="text-center text-nowrap" style="min-width: 100px;">{{ activeuser.name }}</td>
+6 -1
View File
@@ -33,7 +33,12 @@
<div class="card mb-2 shadow-sm" style="width: 450px;">
<div class="card-body">
<h5 class="card-title">{{ user.name }}</h5>
{% if activeuser is not none %}
<h5 class="card-title">{{ user.name }}</h5>
{% else %}
<a href="/season/Christoph" class="link-dark"><h5 class="card-title">{{ user.name }}</h5></a>
{% endif %}
<form action="/guessseason/{{ user.name }}" method="post">
{# Hot Take #}