Add markdown exports and tighten tag visibility
This commit is contained in:
@@ -13,7 +13,10 @@
|
||||
{% for tag in collection.filter_tags.all %}<span class="badge rounded-pill text-bg-light">#{{ tag.name }}</span>{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% if can_edit %}<a class="btn btn-dark" href="{% if collection.mode == 'tags' %}{% url 'collection_edit' collection.id %}{% else %}{% url 'collection_manage' collection.id %}{% endif %}">{% trans "Edit collection" %}</a>{% endif %}
|
||||
<div class="d-flex gap-2">
|
||||
<a class="btn btn-outline-secondary" href="{% url 'collection_export' collection.id %}" hx-boost="false">{% trans "Export" %}</a>
|
||||
{% if can_edit %}<a class="btn btn-dark" href="{% if collection.mode == 'tags' %}{% url 'collection_edit' collection.id %}{% else %}{% url 'collection_manage' collection.id %}{% endif %}">{% trans "Edit collection" %}</a>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% if collection.description %}<div class="content lead mt-4">{{ collection.description|markdown }}</div>{% endif %}
|
||||
</header>
|
||||
@@ -27,7 +30,7 @@
|
||||
|
||||
<div class="collection-flow content">
|
||||
{% if collection.mode == 'tags' %}
|
||||
{% for item in tag_items %}<section id="item-{{ item.id }}" class="collection-flow-section">{{ item|collection_item_markdown }}{% if item.comment %}<div class="text-muted border-start ps-3 mt-3">{{ item.comment|markdown }}</div>{% endif %}</section>{% empty %}<div class="text-center text-muted py-5">{% trans "No entries match the selected tags and types yet." %}</div>{% endfor %}
|
||||
{% for item in tag_items %}<section id="item-{{ item.id }}" class="collection-flow-section{% if item.kind == 'todo' %} d-flex gap-3 align-items-start{% endif %}">{% if item.kind == 'todo' %}<form method="post" action="{% url 'toggle_done' item.id %}" hx-boost="false" class="pt-1">{% csrf_token %}<input type="hidden" name="next" value="{{ request.get_full_path }}#item-{{ item.id }}"><input class="form-check-input" type="checkbox" {% if item.is_done %}checked{% endif %} {% if item.can_toggle_done %}onchange="this.form.submit()"{% else %}disabled{% endif %} aria-label="{% trans 'Done' %}"></form><div class="flex-grow-1 {% if item.is_done %}text-decoration-line-through text-muted{% endif %}">{% endif %}{{ item|collection_item_markdown }}{% if item.comment %}<div class="text-muted border-start ps-3 mt-3">{{ item.comment|markdown }}</div>{% endif %}{% if item.kind == 'todo' %}</div>{% endif %}</section>{% empty %}<div class="text-center text-muted py-5">{% trans "No entries match the selected tags and types yet." %}</div>{% endfor %}
|
||||
{% else %}
|
||||
{% for section in sections %}{% include 'core/_collection_section_read.html' with section=section %}{% empty %}<div class="text-center text-muted py-5">{% trans "This collection has no sections yet." %}</div>{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<div class="row g-4">
|
||||
<aside class="col-lg-3 order-lg-2 mobile-filter-sidebar">
|
||||
<div class="filter-panel">
|
||||
<div class="fw-semibold mb-2 filter-panel-title">{% trans "Filter" %}</div>
|
||||
<div class="d-flex justify-content-between align-items-center mb-2 filter-panel-title"><div class="fw-semibold">{% trans "Filter" %}</div><a class="btn btn-sm btn-outline-secondary" href="{% url 'export_items' %}{% if request.GET.urlencode %}?{{ request.GET.urlencode }}{% endif %}" hx-boost="false">{% trans "Export" %}</a></div>
|
||||
<div class="d-flex flex-wrap gap-2 mb-3 filter-buttons">
|
||||
<a class="btn btn-sm {% if active_kind == 'todo' %}btn-primary{% else %}btn-outline-primary{% endif %}" href="{% if active_kind == 'todo' %}{% query_replace kind=None %}{% else %}{% query_replace kind='todo' %}{% endif %}">Todos{% if active_kind == 'todo' %} ×{% endif %}</a>
|
||||
<a class="btn btn-sm {% if active_kind == 'note' %}btn-secondary{% else %}btn-outline-secondary{% endif %}" href="{% if active_kind == 'note' %}{% query_replace kind=None %}{% else %}{% query_replace kind='note' %}{% endif %}">{% trans "Notes" %}{% if active_kind == 'note' %} ×{% endif %}</a>
|
||||
|
||||
Reference in New Issue
Block a user