LSBC/templates/podcast/index.html.twig

49 lines
1.2 KiB
Twig
Raw Normal View History

{% extends 'base.html.twig' %}
{% block title %}Podcast index{% endblock %}
{% block stylesheets %}
{{ parent() }}
<style>
2023-10-14 18:26:09 +02:00
td img { width: 5em; }
</style>
{% endblock %}
{% block body %}
2023-10-14 18:26:09 +02:00
<h1>Your podcasts</h1>
2023-10-14 18:26:09 +02:00
<table class="table">
<thead>
<tr>
<th>ID</th>
2023-10-14 18:26:09 +02:00
<th>Name</th>
<th>Author</th>
<th>Logo</th>
<th>Actions</th>
2023-10-14 18:26:09 +02:00
</tr>
</thead>
<tbody>
{% for podcast in podcasts %}
<tr>
<td>{{ podcast.id }}</td>
<td>{{ podcast.name }}<br>(<code>{{ podcast.slug }}</code>)</td>
<td>{{ podcast.author }}</td>
<td><img src="{{ podcast.logoPath }}" alt="{{ podcast.name }} logo"></td>
<td>
<a href="{{ path('app_podcast_show', {'id': podcast.id}) }}"
><button>Show</button></a>
<a href="{{ path('app_podcast_edit', {'id': podcast.id}) }}"
><button>Edit</button></a>
</td>
</tr>
{% else %}
<tr>
<td colspan="5">No podcasts found.</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_podcast_new') }}"><button>Create new podcast</button></a>
{% endblock %}