Add Seeds Table
This commit is contained in:
parent
31a31ac34b
commit
9e0ed8ab5b
|
@ -53,6 +53,32 @@
|
|||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
{% if seeds %}
|
||||
<h4>Your Games:</h4>
|
||||
<table id="seed-table" class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Seed</th>
|
||||
<th class="center">Players</th>
|
||||
<th>Created (UTC)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for seed in seeds %}
|
||||
<tr>
|
||||
<td><a href="{{ url_for("viewSeed", seed=seed.id) }}">{{ seed.id|suuid }}</a></td>
|
||||
<td class="center"
|
||||
{% if seed.multidata %}
|
||||
data-tooltip="{{ seed.multidata.names[0]|join(", ")|truncate(256, False, " ...") }}"
|
||||
{% endif %}
|
||||
>{% if seed.multidata %}{{ seed.multidata.names[0]|length }}{% else %}1{% endif %}
|
||||
</td>
|
||||
<td>{{ seed.creation_time.strftime("%Y-%m-%d %H:%M") }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -70,7 +70,8 @@ def uploads():
|
|||
else:
|
||||
flash("Not recognized file format. Awaiting a .multidata file.")
|
||||
rooms = select(room for room in Room if room.owner == session["_id"])
|
||||
return render_template("hostGame.html", rooms=rooms)
|
||||
seeds = select(seed for seed in Seed if seed.owner == session["_id"])
|
||||
return render_template("hostGame.html", rooms=rooms, seeds=seeds)
|
||||
|
||||
|
||||
def allowed_file(filename):
|
||||
|
|
Loading…
Reference in New Issue