LSBC/templates/podcast/index.html.twig

53 lines
1.3 KiB
Twig

{% extends 'base.html.twig' %}
{% block title %}Podcast index{% endblock %}
{% block stylesheets %}
{{ parent() }}
<style>
td img { width: 5em; }
</style>
{% endblock %}
{% block body %}
<h1>Your podcasts</h1>
<table class="table">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Author</th>
<th>Logo</th>
<th>Actions</th>
</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}) }}"
class="btn btn-primary"
>Show</a>
<a
href="{{ path('app_podcast_edit', {'id': podcast.id}) }}"
class="btn btn-primary"
>Edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="5">No podcasts found.</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_podcast_new') }}" class="btn btn-primary">Create new podcast</a>
{% endblock %}