{% extends 'core/base.html' %} {% load i18n markdown_extras %} {% block content %}
{% trans "Collections are currently available on desktop only." %}
← {% trans "View collection" %}

{{ collection.title }}

{% if collection.mode != 'manual' %}{{ collection.get_mode_display }}{% endif %} {% if collection.team %}{{ collection.team.name }}{% else %}{{ collection.get_visibility_display }}{% endif %} {% for tag in collection.filter_tags.all %}#{{ tag.name }}{% endfor %}
{% if can_edit %}
{% trans "Collection settings" %}{% if can_delete %}
{% csrf_token %}
{% endif %}
{% endif %}
{% if collection.description %}
{{ collection.description|markdown }}
{% endif %} {% if sections %}
{% trans "Contents" %}
    {% include 'core/_collection_toc_items.html' with sections=sections %}
{% endif %} {% if pending_item %}

{% trans "The note has a different visibility" %}

{% trans "To add it, change its visibility or create a separate copy for this collection." %}

{{ pending_item.content|truncatechars:180 }}
{% if pending_can_convert %}
{% csrf_token %}
{% endif %}
{% csrf_token %}
{% trans "Cancel" %}
{% if not pending_can_convert %}
{% trans "The original cannot be changed because it is used elsewhere or you cannot edit it." %}
{% endif %}
{% endif %}
{% for section in sections %}

{% if section.item %}{{ section.title|default:section.item.content|markdown_title|truncatechars:100 }}{% else %}{{ section.title|default:section.sub_collection.title|truncatechars:100 }}{% endif %}

{% if section.item %}
{{ section.item|item_markdown }}
{% if section.item.comment %}
{{ section.item.comment|markdown }}
{% endif %}{% else %}
{% trans "Nested collection" %}: {{ section.sub_collection.title }}
{% endif %} {% if can_edit %}
↕
{% csrf_token %}
{% csrf_token %}
{% csrf_token %}
{% csrf_token %}
{% csrf_token %}
{% endif %}
{% empty %}
{% trans "This collection has no sections yet." %}
{% endfor %}
{% if can_edit %}

{% trans "Add existing note or collection" %}

{% csrf_token %}

{% trans "Notes" %}

{% for item in candidates %}
{{ item.content|truncatechars:180 }}
#{{ item.id }} · {{ item.get_visibility_display }}{% if item.team %} · {{ item.team.name }}{% endif %}{% if item.collection_use_count %} · {% blocktrans count count=item.collection_use_count %}used once{% plural %}used {{ count }} times{% endblocktrans %}{% endif %}
{% if item.used_in_current_collection %}{% trans "Already in this collection" %}{% endif %}
{% if item.used_in_current_collection %}{% else %}
{% csrf_token %}
{% endif %}
{% empty %}
{% trans "No matching notes." %}
{% endfor %}

{% trans "Collections" %}

{% for candidate in collection_candidates %}
{{ candidate.title }}
#{{ candidate.id }} · {{ candidate.get_visibility_display }}{% if candidate.team %} · {{ candidate.team.name }}{% endif %}{% if candidate.collection_use_count %} · {% blocktrans count count=candidate.collection_use_count %}used once{% plural %}used {{ count }} times{% endblocktrans %}{% endif %}
{% if candidate.used_in_current_collection %}{% trans "Already in this collection" %}{% endif %}
{% if candidate.used_in_current_collection %}{% else %}
{% csrf_token %}
{% endif %}
{% empty %}
{% trans "No matching collections." %}
{% endfor %}
{% endif %}
{% endblock %}