{% set type = 'asset' %} {% include "snippets/comments-js_" ~ type ~ ".html" %} {% macro comment_form(values={}, empty=False, hidden=True, prefix="", action="add") %} {% endmacro %} {% set content_type = content_type or 'dataset' %} {% set thread = h.get_comment_thread(pkg_name) %} {% macro comment_thread(thread) %}
{% for comment in thread.comments %} {{ comment.id }}
{% if comment.state != 'deleted' %}

{{ comment.subject }}

{% else %}

{{ _('This comment was deleted.') }}

{% endif %}
{% if comment.state != 'deleted' %} {{ comment.content|safe }} {% else %} {% snippet "snippets/comment_deleted.html", comment=comment, show_deleter=True %} {% endif %} {% if comment.state == 'active' %} {% endif %}
{% if comment.comments | length != 0 %} {{ comment_thread(comment) }} {% endif %} {% endfor %}
{% endmacro %}

{{ _('Comments') }}

{{ comment_thread(thread) }}
{% if userobj %}
{% if g.recaptcha_publickey %} {% snippet "user/snippets/recaptcha.html", public_key=g.recaptcha_publickey %} {% endif %}
{% else %} {{ _('Login to comment.') }} {% endif %}