17 lines
873 B
Twig
17 lines
873 B
Twig
|
<h4>Recent comments</h4>
|
||
|
<div class="accordion" id="accordionComment">
|
||
|
{% for comment in comments %}
|
||
|
<div class="accordion-item">
|
||
|
|
||
|
<h2 class="accordion-header" id="heading{{ comment.id }}">
|
||
|
<button class="accordion-button" type="button" data-mdb-toggle="collapse" data-mdb-target="#collapse{{ comment.id }}" aria-controls="collapse{{ comment.id }}">
|
||
|
{{ comment.post.title }}: {{ comment.username }} <code class="text-muted">{{ comment.createdAt.format('Y-m-d H:i:s') }}</code>
|
||
|
</button>
|
||
|
</h2>
|
||
|
<div id="collapse{{ comment.id }}" class="accordion-collapse collapse" aria-labelledby="heading{{ comment.id }}" data-mdb-parent="#accordionComment">
|
||
|
<div class="accordion-body">{{ comment.content }}</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
{% endfor %}
|
||
|
</div>
|