Make HTML output work again

This commit is contained in:
Christian Wolf 2023-11-22 19:03:48 +01:00
parent f944aabc38
commit b79a7dcd49
4 changed files with 18 additions and 9 deletions

View File

@ -11,7 +11,7 @@ class BatchWorker:
self.l = logging.getLogger("solo_turnier.batch")
self.config = config
def run(self, removeFilteredParicipants=True):
def run(self, removeFilteredParicipants=True) -> solo_turnier.types.Stage5:
self.l.debug(self.config.__dict__)
locator = solo_turnier.html_locator.HtmlLocator()

View File

@ -104,4 +104,6 @@ class GroupParser:
]
def getGroupsAsSortedList(self, groups) -> list[Group]:
return [x for x in self.getGroups() if x in groups]
mainGroups = [x for x in self.getGroups() if x in groups]
additionalGroups = set(groups).difference(mainGroups)
return mainGroups + list(additionalGroups)

View File

@ -22,6 +22,12 @@
color: gray;
}
.tab-summary .no-finalist-dance {
color: gray;
text-decoration-style: solid;
text-decoration-line: line-through;
}
@media print {
@page {
size: landscape;

View File

@ -10,7 +10,7 @@
</head>
<body>
{# <h1>Finalauswertung Solo-Turniere</h1> #}
{% for group in data.groups %}
{% for group in data.resultsPerGroup %}
{% block groupBlk scoped %}
<div class="section">
{% if group is none %}
@ -21,11 +21,11 @@
<table class="tab-summary">
<tr>
<th>Teilnehmer</th>
{% for dance in data.results[group].dances %}
{% for dance in data.resultsPerGroup[group].dances %}
<th>{{ dance }}</th>
{% endfor %}
</tr>
{% set activeGroup = data.results[group].results %}
{% set activeGroup = data.resultsPerGroup[group].resultsInGroup %}
{% for participant, results in activeGroup|dictsort() %}
{% block participantGrp scoped %}
{% set rowCls = "" %}
@ -35,16 +35,17 @@
{% if participant.finalist or not onlyFinalists %}
<tr class="{{ rowCls }}">
<td>{{ participant.name }} ({{ participant.id }})</td>
{% for dance in data.results[group].dances %}
{% for dance in data.resultsPerGroup[group].dances %}
{% block danceResult scoped %}
{% set res = activeGroup[participant][loop.index0] %}
<td>
{% if res is not none %}
{% if not participant.finalist %}
Kein/e Finalist/in
Kein/e Finalist/in <br />
{% endif %}
{{ res.getNativePlace() }}
({{ res.nativeClass }}) <br />
<span class="{% if not res.finalist %}no-finalist-dance{% endif %}">
{{ res.getNativePlace() }} ({{ res.nativeClass }}) <br />
</span>
<span class="competition-place">
{{ res.place }} in {{ res.competitionClass }}
</span>