57 lines
1.5 KiB
Twig
57 lines
1.5 KiB
Twig
{% extends 'base.html.twig' %}
|
|
|
|
{% block title %}Episode index{% endblock %}
|
|
|
|
{% block body %}
|
|
<h1>
|
|
{% if podcast is defined %}
|
|
Episodes for {{ podcast.name }}
|
|
{% else %}
|
|
All your episodes
|
|
{% endif %}
|
|
</h1>
|
|
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Title</th>
|
|
<th>Publication date</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for episode in episodes %}
|
|
<tr>
|
|
<td>{{ episode.id }}</td>
|
|
<td>{{ episode.title }}</td>
|
|
<td>{{ episode.publicationDate ? episode.publicationDate|date('Y-m-d H:i:s') : '' }}</td>
|
|
<td>
|
|
<a href="{{ path('app_episode_show', {'id': episode.id}) }}"
|
|
><button>Show</button></a>
|
|
<a href="{{ path('app_episode_edit', {'id': episode.id}) }}"
|
|
><button>Edit</button></a>
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="4">No episodes found.</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
{% if podcast is defined %}
|
|
<a href="{{ path('app_episode_new', {'podcast': podcast.id }) }}"
|
|
><button>Create new episode of this podcast</button></a>
|
|
<a href="{{ path('app_podcast_show', {'id': podcast.id}) }}">Back to podcast</a>
|
|
{% else %}
|
|
<a href="{{ path('app_episode_new') }}"><button>Create new episode</button></a>
|
|
<p>
|
|
To manage episodes of a specific podcast, open the podcast page and use
|
|
the “Manage podcasts” link.
|
|
</p>
|
|
{% endif %}
|
|
|
|
{% endblock %}
|