Files
estus-shots-py/estusshots/templates/season_list.html
2019-10-19 00:30:11 +02:00

63 lines
2.4 KiB
HTML

{% extends "base.html" %}
{% set active_page = "seasons" %}
{% block title %}Seasons {{ super() }}{% endblock %}
{% block page %}
{% if g.is_editor %}
<div class="btn-toolbar" role="toolbar">
<a class="btn btn-primary" href="{{ url_for("season_new") }}" role="button"><span class="fas fa-plus"></span> Season</a>
</div>
{% endif %}
{% if not model.seasons %}
There are no seasons.
{% else %}
<table class="table table-hover table-striped table-bordered">
<thead>
<tr>
<th scope="col" class="col-sm-auto text-center">#</th>
<th scope="col" class="col-sm-auto text-center">Game</th>
<th scope="col" class="col-sm-auto text-center">Season Description</th>
<th scope="col" class="col-sm-auto text-center">Started At</th>
<th scope="col" class="col-sm-auto text-center">Ended At</th>
{# Show #}
<th scope="col" class="col-sm-auto text-center">View</th>
{% if g.is_editor %}
{# Edit #}
<th scope="col" class="col-sm-auto text-center">Editor</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for item in model.seasons %}
<tr>
<td class="col-sm-auto text-center">{{ item.code }}</td>
<td class="col-sm-auto text-center">{{ item.game }}</td>
<td class="col-sm-auto text-center">{{ item.description or "No Description" }}</td>
<td class="col-sm-auto text-center">{{ item.start }}</td>
<td class="col-sm-auto text-center">{{ item.end or "Ongoing" }}</td>
<td class="col-sm-auto text-center">
<a class="btn btn-default" href="{{ url_for("season_overview", season_id = item.id) }}">
<span class="fas fa-eye"></span></a>
</td>
{% if g.is_editor %}
<td class="col-sm-auto text-center">
<a class="btn btn-default" href="{{ url_for('season_edit', season_id = item.id) }}">
<span class="fas fa-pencil-alt"></span>
</a>
<a class="btn btn-default" href="{{ url_for("episode_new", season_id = item.id) }}">
<span class="fas fa-plus"></span> Episode
</a>
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endblock %}