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.
67 lines
2.1 KiB
67 lines
2.1 KiB
{% extends 'base.html.twig' %}
|
|
|
|
{% block title %}{{ 'post'|trans }}{% endblock %}
|
|
|
|
{% block body %}
|
|
<h1>{{ 'post'|trans }}</h1>
|
|
|
|
<table class="table">
|
|
<tbody>
|
|
<tr>
|
|
<th>Id</th>
|
|
<td>{{ post.id }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>{{ 'found_date'|trans }}</th>
|
|
<td>{{ post.foundDate ? post.foundDate|date('Y-m-d H:i:s') : '' }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>{{ 'publication_date'|trans }}</th>
|
|
<td>{{ post.publicationDate ? post.publicationDate|date('Y-m-d H:i:s') : '' }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Latitude</th>
|
|
<td>{{ post.latitude }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Longitude</th>
|
|
<td>{{ post.longitude }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Altitude</th>
|
|
<td>{{ post.altitude }}</td>
|
|
</tr>
|
|
{% if post.image %}
|
|
<tr>
|
|
<th>Image</th>
|
|
{# Vich doesn't prefix the path, as asset() would. #}
|
|
<td><img src="{{ app.request.baseUrl }}{{ vich_uploader_asset(post, 'imageFile') }}" class="img-thumbnail" width="200" alt=""></td>
|
|
</tr>
|
|
{% endif %}
|
|
<tr>
|
|
<th>{{ 'commentary'|trans }}</th>
|
|
<td>{{ post.commentary }}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<a class="btn btn-warning mb-4 mt-4" href="{{ path('app_post_index') }}">{{ 'back_to_list'|trans }}</a>
|
|
|
|
<a class="btn btn-success mb-4 mt-4" href="{{ path('app_post_edit', {'id': post.id}) }}">{{ 'edit'|trans }}</a>
|
|
|
|
{{ include('post/_delete_form.html.twig') }}
|
|
|
|
<div data-turbo="true">
|
|
<div id="comments">
|
|
{% for comment in post.comments %}
|
|
{{ include('/comment/comment.html.twig') }}
|
|
{% endfor %}
|
|
</div>
|
|
|
|
{{ form_start(form) }}
|
|
{{ form_widget(form) }}
|
|
<button type="submit" class="btn btn-primary">Comment</button>
|
|
{{ form_end(form) }}
|
|
</div>
|
|
{% endblock %}
|