{% extends 'base.html' %} {% block right_sidebar %} {% endblock %} {% if current_user.is_authenticated %} {% include 'book/add_collection_modal.html' %} {% include 'book/delete_collection_modal.html' %} {% include 'book/add_sub_collection_modal.html' %} {% include 'book/delete_sub_collection_modal.html' %} {% include 'book/add_section_modal.html' %} {% include 'book/delete_section_modal.html' %} {% endif %} {% block content %}

Table of contents

{% for collection in book.versions[-1].children_collections if not collection.is_root and not collection.is_deleted %}
{% endfor %}

Created by {{book.owner.username}} on {{book.created_at.strftime('%B %d, %Y')}}. Last updated on {{book.created_at.strftime('%B %d, %Y')}}

{% if book.about==None %}About text{% else %}{{book.about}}{% endif %}

{% for collection in book.versions[-1].children_collections if not collection.is_root and not collection.is_deleted %}

#{{collection.label}}

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

##{{sub_collection.label}}

{% for section in sub_collection.active_sections %}

{{ section.label }}

{% if not section.active_interpretations %}

This section is empty

{% else %}

{{ section.approved_interpretation.text|safe }}

Interpretation by {{section.approved_interpretation}} on {{section.approved_interpretation.created_at.strftime('%B %d, %Y')}}

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

{{ section.label }}

{% if not section.active_interpretations %}

This section is empty

{% else %}

{{ section.approved_interpretation.text|safe }}

Interpretation by {{section.approved_interpretation.user.username}} on {{section.approved_interpretation.created_at.strftime('%B %d, %Y')}}
{% endif %} {% endfor %} {% endif %} {% endfor %}
{% endblock %} {% block scripts %} {% endblock %}