Fix filtering w.r.t finalists in web styling
Mutiple rows were colored similarly of some are hidden
This commit is contained in:
parent
6f11554c18
commit
1d69d9fe8a
@ -23,7 +23,8 @@ def main():
|
|||||||
solo_turnier.flask.startFlask(
|
solo_turnier.flask.startFlask(
|
||||||
batchWorker,
|
batchWorker,
|
||||||
debug=cli.getLogLevel() > 0,
|
debug=cli.getLogLevel() > 0,
|
||||||
port=cli.getPort()
|
port=cli.getPort(),
|
||||||
|
showOnlyFinalists=not cli.showAllParticipants()
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
combinedData = batchWorker.run(
|
combinedData = batchWorker.run(
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
import flask
|
import flask
|
||||||
import solo_turnier
|
import solo_turnier
|
||||||
|
import logging
|
||||||
|
|
||||||
|
_l = logging.getLogger(__name__)
|
||||||
|
|
||||||
def startFlask(
|
def startFlask(
|
||||||
batchWorker: solo_turnier.batch.BatchWorker,
|
batchWorker: solo_turnier.batch.BatchWorker,
|
||||||
@ -12,8 +15,9 @@ def startFlask(
|
|||||||
@app.route('/')
|
@app.route('/')
|
||||||
def index():
|
def index():
|
||||||
combinedData = batchWorker.run(False)
|
combinedData = batchWorker.run(False)
|
||||||
|
_l.debug('Show only finalists %s', showOnlyFinalists)
|
||||||
|
|
||||||
return flask.render_template('index.html', data=combinedData)
|
return flask.render_template('index.html', data=combinedData, onlyFinalists=showOnlyFinalists)
|
||||||
|
|
||||||
@app.get('/custom.css')
|
@app.get('/custom.css')
|
||||||
def css():
|
def css():
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
{% if not participant.finalist %}
|
{% if not participant.finalist %}
|
||||||
{% set rowCls = "no-finalist" %}
|
{% set rowCls = "no-finalist" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if participant.finalist or not onlyFinalists %}
|
||||||
<tr class="{{ rowCls }}">
|
<tr class="{{ rowCls }}">
|
||||||
<td>{{ participant.name }} ({{ participant.id }})</td>
|
<td>{{ participant.name }} ({{ participant.id }})</td>
|
||||||
{% for dance in data.results[group].dances %}
|
{% for dance in data.results[group].dances %}
|
||||||
@ -47,6 +48,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tr>
|
</tr>
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
Loading…
Reference in New Issue
Block a user