<section> <?php foreach ($model->getComments() as $comment) { ?> <div class="comment"> <div>Username: <?php ViewEngine::show($comment->getUsername()); ?> </div> <div><?php ViewEngine::show($comment->getCommentDate()); ?> </div> <div><?php ViewEngine::show($comment->getContent()); ?> </div> <?php if ($model->getCanDeleteComment()) { echo Html::form('post', 'administrators/comments/delete/' . $comment->getId()); echo Html::hidden('productId', $model->getProduct()->getId()); echo Html::submit('btn btn-danger', 'Delete comment'); echo Html::csrfToken(); echo Html::formClose(); } ?> </div> <?php } ?> </section>