24 lines
1.3 KiB
HTML
24 lines
1.3 KiB
HTML
{% set bookmark_url = None %}
|
|
{% if type == 'post' %}
|
|
{% set bookmark_url = url_for('api.bookmark_post', post_id=id) %}
|
|
{% else %}
|
|
{% set bookmark_url = url_for('api.bookmark_thread', thread_id=id) %}
|
|
{% endif %}
|
|
<div class="bookmarks-dropdown" data-bookmark-type="{{type}}" data-receive="saveBookmarks" data-bookmark-endpoint="{{bookmark_url}}" data-originally-contained-in="{{ selected.id if selected else ""}}" data-require-reload={{require_reload | int}}>
|
|
<div class="bookmarks-dropdown-header">
|
|
<span>Bookmark collections</span>
|
|
{% if not require_reload %}
|
|
<a href="{{ url_for('users.bookmarks', username=get_active_user().username) }}">View bookmarks</a>
|
|
{% endif %}
|
|
</div>
|
|
<div class="bookmark-dropdown-items-container">
|
|
{% for collection in collections %}
|
|
<div class="bookmark-dropdown-item {{ "selected" if selected and (selected.id | int) == (collection.id | int) else ""}}" data-send="selectBookmarkCollection" data-receive="selectBookmarkCollection" data-collection-id="{{collection.id}}">{{collection.name}} ({{ collection.get_posts_count() }}p, {{ collection.get_threads_count() }}t)</div>
|
|
{% endfor %}
|
|
</div>
|
|
<span>
|
|
<input type="text" placeholder="Memo" class="bookmark-memo-input" value="{{memo}}"></input>
|
|
<button type="button" data-send="saveBookmarks">Save</button>
|
|
</span>
|
|
</div>
|