{{ post.title }}
{# The 'IS_AUTHENTICATED_FULLY' role ensures that the user has entered
their credentials (login + password) during this session. If they
are automatically logged via the 'Remember Me' functionality, they won't
be able to add a comment.
See https://symfony.com/doc/current/security/remember_me.html#forcing-the-user-to-re-authenticate-before-accessing-certain-resources
#}
{% if is_granted('IS_AUTHENTICATED_FULLY') %}
{{ render(controller('App\\Controller\\BlogController::commentForm', {'id': post.id})) }}
{% else %}
{{ 'action.sign_in'|trans }} {{ 'post.to_publish_a_comment'|trans }}
{% endif %}{{ 'post.num_comments'|trans({ 'count': post.comments|length }) }}
{% for comment in post.comments %}{{ 'post.no_comments'|trans }}
{{ comment.author.fullName }} {{ 'post.commented_on'|trans }} {{ comment.publishedAt|format_datetime('medium', 'short', '', 'UTC') }}