{% extends 'IcapBlogBundle::layout.html.twig' %} {% trans_default_domain "icap_blog" %} {% block title %}{{ _resource.resourceNode.name }}{% endblock %} {% block blog_content %} {% set isPublished = post.isPublished %} {% include 'IcapBlogBundle:Post:postHeader.html.twig' with {'mode': 'post_view'} %}
{{ post.content|raw }}
{% include 'IcapBlogBundle:Post:postFooter.html.twig' with {'mode': 'post_view'} %} {% set blogOptions = _resource.options %} {% if _resource.isCommentsAuthorized %} {% if _resource.isCommentsAuthorized %} {% if false == is_granted('IS_AUTHENTICATED_FULLY') and false == _resource.isAuthorizeAnonymousComment %}

{{ 'icap_blog_post_comment_need_authentication'|trans({'%connection_url%': path('claro_security_login')}, 'icap_blog')|raw }}

{% else %} {% set countComments = is_granted('EDIT', _resource) ? post.countComments(true) : post.countComments %} {% if countComments > 0 %}{{ 'add_comment'|trans }}{% else %}{{ 'be_the_first_to_comment'|trans }}{% endif %} :
{% if false ==_resource.isAutoPublishComment %}

{{ 'icap_blog_post_comment_need_validation_before_publishing'|trans({}, 'icap_blog') }}

{% endif %} {{ form_errors(form) }} {{ form_widget(form.message) }} {{ form_rest(form) }}
{% endif %} {% endif %} {% endif %} {% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}