You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
herbarium/templates/post/table.html.twig

46 lines
1.5 KiB

{% extends 'base.html.twig' %}
{% block title %}{{ 'post_index'|trans }}{% endblock %}
{% block body %}
<h1>{{ 'post_index'|trans }}</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>{{ 'found_date'|trans }}</th>
<th>{{ 'publication_date'|trans }}</th>
<th>Latitude</th>
<th>Longitude</th>
<th>Altitude</th>
<th>{{ 'commentary'|trans }}</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'|trans }}</a>
<a class="btn btn-success mb-4 mt-4" href="{{ path('app_post_edit', {'id': post.id}) }}">{{ 'edit'|trans }}</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="8">{{ 'no_records_found'|trans }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_post_new') }}">{{ 'create_new'|trans }}</a>
{% endblock %}