56 lines
1.8 KiB
HTML
56 lines
1.8 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="/seasons/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>
|
|
{% for prop, caption in model.columns %}
|
|
<th scope="col" class="col-sm-auto text-center">{{ caption }}</th>
|
|
{% endfor %}
|
|
|
|
{# 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>
|
|
{% for prop, caption in model.columns %}
|
|
<td class="col-sm-auto text-center">{{ item[prop] }}</td>
|
|
{% endfor %}
|
|
|
|
<td class="col-sm-auto text-center">
|
|
<a class="btn btn-dark" href="/seasons/{{ 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-dark" href="/seasons/{{ item.id }}/edit"><span class="fas fa-pencil-alt"></span></a>
|
|
|
|
<a class="btn btn-dark" href="/seasons/{{ item.id }}/new">
|
|
<span class="fas fa-plus"></span> Episode
|
|
</a>
|
|
</td>
|
|
{% endif %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
{% endif %}
|
|
{% endblock %} |