175 lines
5.3 KiB
HTML
175 lines
5.3 KiB
HTML
{% extends "base.html" %}
|
|
{% set active_page = "seasons" %}
|
|
{% block title %}{{ model.title }} {{ super() }}{% endblock %}
|
|
|
|
{% block page %}
|
|
{% if g.is_editor %}
|
|
<div class="btn-toolbar" role="toolbar">
|
|
<a class="btn btn-primary" role="button"
|
|
href="{{ url_for('episode_edit', season_id = model.season.id, episode_id = model.episode.id) }}">
|
|
<span class="fas fa-pencil-alt"></span> Edit Episode
|
|
</a>
|
|
<a class="btn btn-primary" role="button"
|
|
href="{{ url_for("event_new", ep_id = model.episode.id, s_id = model.season.id) }}" >
|
|
<span class="fas fa-plus"></span> Event
|
|
</a>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="row">
|
|
<div class="col-sm-4">
|
|
|
|
<!--region Info Card-->
|
|
|
|
<div class="card">
|
|
<div class="card-header text-center">
|
|
{{ model.episode.code }}: {{ model.episode.title }}
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="card-text">
|
|
<ul class="list-group list-group-flush">
|
|
<li class="list-group-item">
|
|
<span class="font-weight-bold">Date:</span>
|
|
{{ model.episode.date }}
|
|
</li>
|
|
<li class="list-group-item">
|
|
<span class="font-weight-bold">Start:</span>
|
|
{{ model.episode.start|format_time or "Not started yet" }}
|
|
</li>
|
|
<li class="list-group-item">
|
|
<span class="font-weight-bold">End:</span>
|
|
{{ model.episode.end|format_time or "Not ended yet"}}
|
|
</li>
|
|
<li class="list-group-item">
|
|
<span class="font-weight-bold">Play Time:</span>
|
|
{{ model.episode.playtime or 0 }} Hours
|
|
</li>
|
|
<li class="list-group-item">
|
|
<span class="font-weight-bold">Enemies Defeated:</span>
|
|
{{ model.victories|length or 0 }}
|
|
</li>
|
|
<li class="list-group-item">
|
|
<span class="font-weight-bold">Deaths:</span>
|
|
{{ model.deaths|length or 0}}
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!--endregion-->
|
|
|
|
<!--region Player Card-->
|
|
|
|
<div class="card">
|
|
<div class="card-header text-center">
|
|
Players in this episode
|
|
</div>
|
|
<div class="card-body">
|
|
<table class="table table-striped table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col" class="col-sm-auto text-center">Name</th>
|
|
<th scope="col" class="col-sm-auto text-center">Playtime</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for player in model.players %}
|
|
<tr>
|
|
<td class="col-sm-auto text-center">{{ player.name }}</td>
|
|
<td class="col-sm-auto text-center">{{ "0m" }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<!--endregion-->
|
|
|
|
</div>
|
|
|
|
<div class="col-sm-8">
|
|
|
|
<!--region Deaths Card-->
|
|
|
|
<div class="card">
|
|
<div class="card-header text-center">
|
|
Deaths
|
|
</div>
|
|
<div class="card-body">
|
|
|
|
{% if model.deaths %}
|
|
|
|
<table class="table table-striped table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col" class="col-xs-auto text-center">Time</th>
|
|
<th scope="col" class="col-xs text-center">Enemy</th>
|
|
<th scope="col" class="col-xs text-center">Player</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for entry in model.deaths %}
|
|
<tr>
|
|
<td class="col-xs-auto text-center">{{ entry.time|format_time }}</td>
|
|
<td class="col-xs text-center">{{ entry.enemy.name }}</td>
|
|
<td class="col-xs text-center">{{ entry.player.name }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
{% else %}
|
|
|
|
<div class="alert alert-info">Nothing did happen yet</div>
|
|
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<!--endregion-->
|
|
|
|
<!--region Victories Card-->
|
|
|
|
<div class="card">
|
|
<div class="card-header text-center">
|
|
Victories
|
|
</div>
|
|
<div class="card-body">
|
|
|
|
{% if model.victories %}
|
|
|
|
<table class="table table-striped table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col" class="col-xs-auto text-center">Time</th>
|
|
<th scope="col" class="col-xs text-center">Enemy</th>
|
|
<th scope="col" class="col-xs text-center">Player</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for entry in model.victories %}
|
|
<tr>
|
|
<td class="col-xs-auto text-center">{{ entry.time|format_time }}</td>
|
|
<td class="col-xs text-center">{{ entry.enemy.name }}</td>
|
|
<td class="col-xs text-center">{{ entry.player.name }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
{% else %}
|
|
|
|
<div class="alert alert-info">No Enemies were defeated</div>
|
|
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<!--endregion-->
|
|
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|