From e04385c23dc3b0614af8777b175795836435898d Mon Sep 17 00:00:00 2001 From: rucki Date: Thu, 3 Sep 2026 14:18:17 +0200 Subject: [PATCH] Add image attachment lightbox --- core/templates/core/_item.html | 2 +- core/templates/core/base.html | 7 +++++++ core/tests.py | 10 ++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/core/templates/core/_item.html b/core/templates/core/_item.html index 7139a68..d5d49dd 100644 --- a/core/templates/core/_item.html +++ b/core/templates/core/_item.html @@ -21,7 +21,7 @@ {% if item.attachments.all %}
{% trans "Attachments:" %} {% for a in item.attachments.all %}{{ a.file.name }} {% endfor %}
- {% for a in item.attachments.all %}{% if a.file.name|is_image and not a|is_embedded:item %}{{ a.file.name }}{% endif %}{% endfor %} + {% for a in item.attachments.all %}{% if a.file.name|is_image and not a|is_embedded:item %}{% endif %}{% endfor %}
{% endif %} diff --git a/core/templates/core/base.html b/core/templates/core/base.html index 3a111c2..9a168b5 100644 --- a/core/templates/core/base.html +++ b/core/templates/core/base.html @@ -37,6 +37,10 @@ {% block toolbar_filter %}{% endblock %}
{% for message in messages %}
{{ message }}
{% endfor %}{% block content %}{% endblock %}
+ {% if user.is_authenticated and request.resolver_match.url_name == 'index' %}{% endif %}