53 lines
2.3 KiB
HTML
53 lines
2.3 KiB
HTML
{% from "common/macros.html" import accordion, full_post, bookmark_button %}
|
|
{% from "common/icons.html" import icn_bookmark %}
|
|
{% extends "base.html" %}
|
|
{% block title %}bookmarks{% endblock %}
|
|
{% block content %}
|
|
<div class="darkbg inbox-container">
|
|
<a class="linkbutton" href="{{ url_for('users.bookmark_collections', username=get_active_user().username) }}">Manage collections</a>
|
|
{% for collection in collections | sort(attribute='sort_order') %}
|
|
{% call(section) accordion(disabled=collection.is_empty()) %}
|
|
{% if section == 'header' %}
|
|
<h1 class="thread-title">{{ collection.name }}</h1>{{" (no bookmarks)" if collection.is_empty() else ""}}
|
|
{% else %}
|
|
{% call(inner_section) accordion(disabled=not collection.has_threads()) %}
|
|
{% if inner_section == 'header' %}
|
|
Threads{{" (no bookmarks)" if not collection.has_threads() else ""}}
|
|
{% else %}
|
|
<table class="colorful-table">
|
|
<thead>
|
|
<th>Title</th>
|
|
<th>Memo</th>
|
|
<th class="small">Manage</th>
|
|
</thead>
|
|
{% for thread in collection.get_threads() %}
|
|
<tr>
|
|
<td>
|
|
<a href="{{ url_for('threads.thread', slug=thread.get_thread().slug) }}">{{ thread.get_thread().title }}</a>
|
|
</td>
|
|
<td>
|
|
<i>{{ thread.note }}</i>
|
|
</td>
|
|
<td>
|
|
{{ bookmark_button(type='thread', id=thread.thread_id, message='Manage…', require_reload=true) }}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% endif %}
|
|
{% endcall %}
|
|
{% call(inner_section) accordion(disabled=not collection.has_posts()) %}
|
|
{% if inner_section == 'header' %}
|
|
Posts{{" (no bookmarks)" if not collection.has_posts() else ""}}
|
|
{% else %}
|
|
{% for post in collection.get_posts() %}
|
|
{{ full_post(post.get_post().get_full_post_view(), no_reply=false, render_sig=false, show_thread_title=true, show_bookmark=true, memo=post.note, bookmark_message="Manage…", reload_after_bookmark=true) }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endcall %}
|
|
{% endif %}
|
|
{% endcall %}
|
|
{% endfor %}
|
|
</div>
|
|
{% endblock %}
|