diff --git a/.vscode/settings.json b/.vscode/settings.json index 9fdcac7..041e617 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -29,6 +29,7 @@ "siwe", "sortablejs", "sqlalchemy", + "subcollection", "tailwindcss", "upvoted", "viewonly", @@ -37,19 +38,11 @@ "wsgi", "wtforms" ], - "python.testing.unittestArgs": [ - "-v", - "-s", - "./tests", - "-p", - "*test.py" - ], + "python.testing.unittestArgs": ["-v", "-s", "./tests", "-p", "*test.py"], "python.testing.pytestEnabled": true, "python.testing.unittestEnabled": false, - "python.testing.pytestArgs": [ - "tests" - ], + "python.testing.pytestArgs": ["tests"], "[python]": { "editor.defaultFormatter": "ms-python.black-formatter" } -} \ No newline at end of file +} diff --git a/app/templates/book/collection_view.html b/app/templates/book/collection_view.html index 209dfcf..52cc753 100644 --- a/app/templates/book/collection_view.html +++ b/app/templates/book/collection_view.html @@ -121,22 +121,26 @@

- {% if book.original_book %} - Forked by - - {{book.owner.username}} - - from - - {{book.original_book.owner.username}}/{{book.original_book.label}} - - {% else %} - Created by - - {{book.owner.username}} - - {% endif %} - on {{book.created_at.strftime('%B %d, %Y')}}. Last updated on + {% if book.original_book %} Forked by + + {{book.owner.username}} + + from + + {{book.original_book.owner.username}}/{{book.original_book.label}} + + {% else %} Created by + + {{book.owner.username}} + + {% endif %} on {{book.created_at.strftime('%B %d, %Y')}}. Last updated on {{book.created_at.strftime('%B %d, %Y')}}

@@ -147,7 +151,11 @@ Version: {{ version.semver.title() }}

-
@@ -206,11 +214,11 @@ {% else %} {% set children_collections = book.active_version.children_collections %} {% endif %} {% for collection in children_collections if not collection.is_root and not collection.is_deleted %} -

+

#{{collection.label}}

{% if not collection.active_sections and not collection.active_children %} -

Collection is empty

+

This collection is empty

{% endif %} {{recursive_render("book/components/sub_collection_preview_content.html",collection,book,version)|safe}} {% endfor %} diff --git a/app/templates/book/components/sub_collection_preview_content.html b/app/templates/book/components/sub_collection_preview_content.html index a3f548a..7d23a4c 100644 --- a/app/templates/book/components/sub_collection_preview_content.html +++ b/app/templates/book/components/sub_collection_preview_content.html @@ -7,7 +7,7 @@

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

This sub collection is empty

+

This subcollection is empty

{% endif %} {% if sub_collection.active_children %}