Link to object in notifications dropdown only for non-destructive events

This commit is contained in:
Jeremy Stretch 2024-08-15 10:48:28 -04:00
parent ec25b06f58
commit add68d904a

View File

@ -7,7 +7,11 @@
<i class="{{ notification.event.icon }}"></i>
</div>
<div class="col text-truncate">
<a href="{% url 'extras:notification_read' pk=notification.pk %}" class="text-body d-block">{{ notification.object_repr }}</a>
{% if not notification.event.destructive %}
<a href="{% url 'extras:notification_read' pk=notification.pk %}" class="text-body d-block">{{ notification.object_repr }}</a>
{% else %}
<span class="text-body d-block">{{ notification.object_repr }}</span>
{% endif %}
<div class="d-block text-secondary fs-5">{{ notification.event }} {{ notification.created|timesince }} {% trans "ago" %}</div>
</div>
<div class="col-auto">