Files
herbarium/templates/post/table.html.twig
clfreville2 49d60871c9 Add post and species forms
Squashed commit of the following:
Author: Hugo PRADIER <Hugo.PRADIER2@etu.uca.fr>
Author: bastien ollier <bastien.ollier@etu.uca.fr>
Author: clfreville2 <clement.freville2@etu.uca.fr>
Reviewed on #7
2024-06-07 18:31:20 +02:00

46 lines
1.3 KiB
Twig

{% extends 'base.html.twig' %}
{% block title %}Post index{% endblock %}
{% block body %}
<h1>Post index</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>FoundDate</th>
<th>PublicationDate</th>
<th>Latitude</th>
<th>Longitude</th>
<th>Altitude</th>
<th>Commentary</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for post in posts %}
<tr>
<td>{{ post.id }}</td>
<td>{{ post.foundDate ? post.foundDate|date('Y-m-d H:i:s') : '' }}</td>
<td>{{ post.publicationDate ? post.publicationDate|date('Y-m-d H:i:s') : '' }}</td>
<td>{{ post.latitude }}</td>
<td>{{ post.longitude }}</td>
<td>{{ post.altitude }}</td>
<td>{{ post.commentary }}</td>
<td>
<a href="{{ path('app_post_show', {'id': post.id}) }}">show</a>
<a href="{{ path('app_post_edit', {'id': post.id}) }}">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="8">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_post_new') }}">Create new</a>
{% endblock %}