{% import 'input/form.html' as form with context %} {% import 'input/field.html' as field %} {% macro head(service, node) %} {# include data needed to identify the node to use for commenting #} {% endmacro %} {% macro submit() %} {% endmacro %} {% macro comment(service, node, action='') %} {% call form.form(action=action) %} {{ head(service, node) }} {{ field.textarea("body", placeholder=_("Your comment")) }} {{ submit() }} {% endcall %} {% endmacro %} {% macro comment_or_login(service, node, action='') %} {# show comment form a a message asking to log in login is checked using profile #} {% if profile %} {{ comment(service, node, action) }} {% else %}
{% trans %}You are not logged. You need to log in to comment.{% endtrans %}
{% if login_url is defined %}{% trans link_start=('')|join|safe, link_end=''|safe %} To log in {{link_start}}follow this link{{link_end}} {% endtrans %}
{% endif %}