diff --git a/app/models/collection.py b/app/models/collection.py index 2c8d11a..39c6313 100644 --- a/app/models/collection.py +++ b/app/models/collection.py @@ -22,7 +22,7 @@ class Collection(BaseModel): "Collection", backref=db.backref("parent", remote_side=[id]), viewonly=True, - order_by="desc(Collection.id)", + order_by="asc(Collection.id)", ) sections = db.relationship("Section") diff --git a/app/static/css/styles.css b/app/static/css/styles.css index 36ef4b6..0eae315 100644 --- a/app/static/css/styles.css +++ b/app/static/css/styles.css @@ -1221,6 +1221,11 @@ input:checked + .toggle-bg { margin-bottom: auto; } +.my-3 { + margin-top: 0.75rem; + margin-bottom: 0.75rem; +} + .-mb-px { margin-bottom: -1px; } @@ -1353,6 +1358,14 @@ input:checked + .toggle-bg { margin-top: auto; } +.mt-\[135\] { + margin-top: 135; +} + +.box-border { + box-sizing: border-box; +} + .block { display: block; } @@ -1833,10 +1846,18 @@ input:checked + .toggle-bg { align-self: center; } +.overflow-auto { + overflow: auto; +} + .overflow-hidden { overflow: hidden; } +.overflow-scroll { + overflow: scroll; +} + .overflow-x-auto { overflow-x: auto; } @@ -1853,6 +1874,10 @@ input:checked + .toggle-bg { overflow-x: scroll; } +.overflow-y-scroll { + overflow-y: scroll; +} + .truncate { overflow: hidden; text-overflow: ellipsis; @@ -2295,6 +2320,10 @@ input:checked + .toggle-bg { padding-top: 1.5rem; } +.pt-\[135\] { + padding-top: 135; +} + .text-left { text-align: left; } diff --git a/app/templates/book/collection_view.html b/app/templates/book/collection_view.html index 985e6bf..28235b6 100644 --- a/app/templates/book/collection_view.html +++ b/app/templates/book/collection_view.html @@ -14,11 +14,11 @@ {% block content %} -
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}}
+#{{collection.label}}
+ {% if not collection.is_leaf and not collection.children %} +Collection is empty
+ {% endif %} {% if not collection.is_leaf %} {% for sub_collection in collection.children if not sub_collection.is_deleted%} -##{{sub_collection.label}}
+##{{sub_collection.label}}
+ {% if not sub_collection.active_sections %} +This sub collection is empty
+ {% endif %} {% for section in sub_collection.active_sections %}{{ section.label }}
+ +{{ section.label }}
{% if not section.active_interpretations %}This section is empty
{% else %}{{ section.approved_interpretation.text|safe }}
-{{ section.approved_interpretation.text|safe }}