{%- from 'common/macros.html' import subheader, sortable_list, sortable_list_item -%} {%- macro collection_item(name='', can_delete=true, id=-1, thread_count=0, post_count=0) -%} {{thread_count}} {{'thread' | pluralize(num=thread_count)}}, {{post_count}} {{'post' | pluralize(num=post_count)}} {%- if not can_delete -%} Default collection {%- else -%} {%- endif -%} {%- endmacro -%} {%- extends 'base.html' -%} {%- block title -%}managing bookmark collections{%- endblock -%} {%- block content -%} {%- set sh -%} Drag collections to reoder them. You cannot move or remove the default collection, but you can rename it.
This page requires JS enabled to work correctly.
{%- endset -%} {%- call() subheader('Manage bookmark collections', sh) -%}
Actions
{%- endcall -%}
{%- call() sortable_list(attr={'data-r': 'addCollection'}) -%} {%- for collection in collections -%} {%- call() sortable_list_item(key='bc', immovable=collection.is_default == 1, attr={'data-r': 'deleteCollection', 'data-id': collection.id}) -%} {{ collection_item(name=collection.name, can_delete=collection.is_default != 1, thread_count=collection.get_threads_count(), post_count=collection.get_posts_count(), id=collection.id) }} {%- endcall -%} {%- endfor -%} {%- endcall -%}
{%- endblock -%}