WebHost: Refactor tracker.py, removal of dead code, and tweaks to layouts of some tracker pages. (#2438)

This commit is contained in:
Zach Parks
2023-11-18 12:29:35 -06:00
committed by GitHub
parent 185a519248
commit 790f192ded
22 changed files with 2915 additions and 2203 deletions

View File

@@ -0,0 +1,37 @@
{% for team, hints in hints.items() %}
<div class="table-wrapper">
<table id="hints-table" class="table non-unique-item-table" data-order='[[5, "asc"], [0, "asc"]]'>
<thead>
<tr>
<th>Finder</th>
<th>Receiver</th>
<th>Item</th>
<th>Location</th>
<th>Game</th>
<th>Entrance</th>
<th class="center-column">Found</th>
</tr>
</thead>
<tbody>
{%- for hint in hints -%}
{%-
if current_tracker == "Generic" or (
games[(team, hint.finding_player)] == current_tracker or
games[(team, hint.receiving_player)] == current_tracker
)
-%}
<tr>
<td>{{ player_names_with_alias[(team, hint.finding_player)] }}</td>
<td>{{ player_names_with_alias[(team, hint.receiving_player)] }}</td>
<td>{{ item_id_to_name[games[(team, hint.receiving_player)]][hint.item] }}</td>
<td>{{ location_id_to_name[games[(team, hint.finding_player)]][hint.location] }}</td>
<td>{{ games[(team, hint.finding_player)] }}</td>
<td>{% if hint.entrance %}{{ hint.entrance }}{% else %}Vanilla{% endif %}</td>
<td class="center-column">{% if hint.found %}✔{% endif %}</td>
</tr>
{% endif %}
{%- endfor -%}
</tbody>
</table>
</div>
{% endfor %}