Implement comments (#10)
Allow logged users to comment posts. Edition is not allowed via the API since it doesn't support auth yet. Symfony UX is used with Turbo to avoid full pages reload, without JavaScript™. Co-authored-by: clfreville2 <clement.freville2@etu.uca.fr> Reviewed-on: https://codefirst.iut.uca.fr/git/clement.freville2/herbarium/pulls/10
This commit is contained in:
@@ -4,16 +4,16 @@
|
||||
|
||||
{% block body %}
|
||||
{% for post in posts.iterator %}
|
||||
<div class="card" style="width: 42rem; margin: 20px 0 50px 100px;">
|
||||
<div class="card mb-4">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{{ post.species ? post.species.vernacularName : 'Post' }}</h5>
|
||||
<h5 class="card-title"><a href="{{ path('app_post_show', {id: post.id}) }}">{{ post.species ? post.species.vernacularName : 'Post' }}</a></h5>
|
||||
<h6 class="card-subtitle mb-2 text-muted">{{ post.foundDate | date("d/m/Y \\à H \\h") }}</h6>
|
||||
<p class="card-subtitle mb-2 text-muted">{{ post.latitude }}, {{ post.longitude }}, {{ post.altitude }}m</p>
|
||||
<p class="card-text">{{ post.commentary }}</p>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
28 ❤️
|
||||
128 💬
|
||||
{{ post.comments.count() }} 💬
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
Reference in New Issue
Block a user