You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.3 KiB

{% extends 'player_base.html' %}
{% block player_app_content %}
5 years ago
<h1>Hi, {{ current_user.name }}!</h1>
5 years ago
<h2>My games:</h2>
{% if current_user.games %}
5 years ago
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th scope="col">Game Name</th>
<th scope="col">Current State</th>
5 years ago
<th scope="col">Start Time</th>
<th scope="col">End Time</th>
<th scope="col">My Role</th>
</tr>
</thead>
<tbody>
{% for game in current_user.games %}
<tr>
<td><a href="{{ url_for('main.game_dashboard', game_name = game.name) }}">{{ game.name }}</a></td>
<td>{{ game.state.name}}</td>
5 years ago
<td>{{ game.start_time }}</td>
<td>{{ game.end_time }}</td>
<td>
{% for gameplayer in current_user.user_games if gameplayer.game == game %}
{{ gameplayer.role.name }}
{% endfor %}
</td>
5 years ago
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<div class="alert alert-info" role="alert">
You don't participate in any game yet 😢
</div>
{% endif %}
5 years ago
{% endblock %}