Implement comments
This commit is contained in:
17
templates/comment/comment.html.twig
Normal file
17
templates/comment/comment.html.twig
Normal file
@@ -0,0 +1,17 @@
|
||||
<turbo-frame id="comment_{{ comment.id }}">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">
|
||||
{{ comment.author.email }} le {{ comment.createdAt | date }}
|
||||
{% if comment.createdAt != comment.editedAt %}
|
||||
(modifié le {{ comment.editedAt | date }})
|
||||
{% endif %}
|
||||
</h5>
|
||||
<p class="card-text">{{ comment.content }}</p>
|
||||
{% if is_granted('COMMENT_EDIT', comment) %}
|
||||
<a href="{{ path('app_post_comment_edit', {'id': comment.id}) }}" class="btn btn-primary">Modifier</a>
|
||||
{{ include('comment/_delete_form.html.twig') }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</turbo-frame>
|
Reference in New Issue
Block a user