Files
estus-shots-py/estusshots/templates/episode_details.html

134 lines
4.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-6">
<!--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 }}
</li>
<li class="list-group-item">
<span class="font-weight-bold">End:</span>
{{ model.episode.end|format_time }}
</li>
<li class="list-group-item">
<span class="font-weight-bold">Play Time:</span>
{{ model.episode.playtime }}
</li>
<li class="list-group-item">
<span class="font-weight-bold">Enemies Defeated:</span>
{{ model.events.victory_count }}
</li>
<li class="list-group-item">
<span class="font-weight-bold">Deaths:</span>
{{ model.events.defeat_count }}
</li>
</ul>
</div>
</div>
</div>
<!--endregion-->
<hr>
<!--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>
</tr>
</thead>
<tbody>
{% for player in model.players %}
<tr>
<td class="col-sm-auto text-center">{{ player.name }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<!--endregion-->
</div>
<div class="col-sm-6">
{% if model.events %}
<div class="card">
<div class="card-header text-center">
Event List
</div>
<div class="card-body">
<table class="table table-striped table-bordered">
<thead>
<tr>
<th scope="col" class="col-sm-auto text-center">Time</th>
<th scope="col" class="col-sm-auto text-center">Type</th>
<th scope="col" class="col-sm-auto text-center">Player</th>
<th scope="col" class="col-sm-auto text-center">Enemy</th>
</tr>
</thead>
<tbody>
{% for entry in model.events.entries %}
<tr>
<td class="col-sm-auto text-center">{{ entry.time }}</td>
<td class="col-sm-auto text-center">{{ entry.type.name }}</td>
<td class="col-sm-auto text-center">{{ entry.type.player_name }}</td>
<td class="col-sm-auto text-center">{{ entry.type.enemy_name }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% else %}
<div class="card">
<div class="card-header text-center">
Event List
</div>
<div class="card-body">
<div class="alert alert-info">Nothing did happen yet</div>
</div>
</div>
{% endif %}
</div>
</div>
{% endblock %}