{% if not collection.is_leaf %} {% for sub_collection in collection.active_children if not sub_collection.is_deleted%}

##{{sub_collection.label}}/{{sub_collection.id}}

{% if not sub_collection.active_sections and not sub_collection.active_children %}

This sub collection is empty

{% endif %} {% if sub_collection.active_children %} {{recursive_render("book/components/sub_collection_preview_content.html",sub_collection,book)|safe}} {% else %} {% for section in sub_collection.active_sections %}

{{ section.label }}/{{section.id}}

{% if not section.active_interpretations %}

This section is empty

{% else %}

{{display_inline_elements(section.approved_interpretation.text)|safe }}

Interpretation by {{section.approved_interpretation.user.username}} on {{section.approved_interpretation.created_at.strftime('%B %d, %Y')}}
{% if not section.approved_comments %}

No comments for current section

{% else %}

{% endif %} {% endif %}
{% endfor %} {% endif %} {% endfor %} {% else %} {% for section in collection.active_sections %}

{{ section.label }}/{{section.id}}

{% if not section.active_interpretations %}

This section is empty

{% else %}

{{ display_inline_elements(section.approved_interpretation.text)|safe }}

Interpretation by {{section.approved_interpretation.user.username}} on {{section.approved_interpretation.created_at.strftime('%B %d, %Y')}}
{% if not section.approved_comments %}

No comments for current section

{% else %}

{% endif %} {% endif %} {% endfor %} {% endif %}