Add truncate_middle filter for middle-ellipsis on long filenames (#21253)

This commit is contained in:
bctiemann
2026-01-22 12:40:48 -05:00
committed by GitHub
parent 077d9b1129
commit 4b4c542dce
2 changed files with 14 additions and 1 deletions

View File

@@ -43,7 +43,7 @@ IMAGEATTACHMENT_IMAGE = """
<a href="{{ record.image.url }}" target="_blank" class="image-preview" data-bs-placement="top">
<i class="mdi mdi-image"></i></a>
{% endif %}
<a href="{{ record.get_absolute_url }}">{{ record }}</a>
<a href="{{ record.get_absolute_url }}">{{ record.filename|truncate_middle:16 }}</a>
"""
NOTIFICATION_ICON = """