Merge pull request #75 from Simple2B/kostia/fix/add_button

fixes
This commit is contained in:
Костя Столярский 2023-05-26 12:36:58 +03:00 committed by GitHub
commit 3ef9346466
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 5 deletions

View File

@ -36,4 +36,8 @@ class BookVersion(BaseModel):
@property
def children_collections(self):
return self.root_collection.children
return [
collection
for collection in self.root_collection.children
if not collection.is_deleted
]

File diff suppressed because one or more lines are too long

View File

@ -29,7 +29,7 @@
<div class="flex text-black dark:text-white">
<!-- prettier-ignore -->
<div>
{% if not book.versions[-1].children_collections %}
{% if not book.versions[-1].children_collections and current_user.is_authenticated %}
<button type="button" data-modal-target="add-collection-modal" data-modal-toggle="add-collection-modal" ><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M12 9v6m3-3H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" /> </svg> </button>
{% endif %}
<a href="{{ url_for("book.settings", book_id=book.id) }}" type="button" class="ml-2" >
@ -262,7 +262,7 @@
<div class="gap-1 flex flex-wrap">
{% for tag in book.tags %}
<div class="cursor-pointer multiple-input-word bg-sky-300 hover:bg-sky-400 dark:bg-blue-600 dark:hover:bg-blue-700 dark:text-white rounded text-center py-1/2 px-2">{{tag.name}}</div>
<a href="{{url_for('search.tag_search_interpretations',tag_name=tag.name)}}"><div class="cursor-pointer multiple-input-word bg-sky-300 hover:bg-sky-400 dark:bg-blue-600 dark:hover:bg-blue-700 dark:text-white rounded text-center py-1/2 px-2">{{tag.name}}</div></a>
{% endfor %}
</div>

View File

@ -202,7 +202,7 @@
</div>
<div class="p-5 m-3">
{% for child in comment.children %}
<div class="p-5 mb-2 flex justify-between items-end bg-slate-600 rounded-lg">
<div class="p-5 mb-2 flex justify-between items-end bg-slate-100 dark:bg-slate-600 rounded-lg">
<div class="ql-snow">
<div class="inline-block mb-4 ql-editor-readonly !p-0">
{{display_tags(child.text)|safe}}