diff --git a/src/fellchensammlung/static/fellchensammlung/js/toggles.js b/src/fellchensammlung/static/fellchensammlung/js/toggles.js index 9710081..5c6fe72 100644 --- a/src/fellchensammlung/static/fellchensammlung/js/toggles.js +++ b/src/fellchensammlung/static/fellchensammlung/js/toggles.js @@ -22,7 +22,7 @@ document.addEventListener('DOMContentLoaded', () => { // Looks for all notifications with a delete and allows closing them when pressing delete document.addEventListener('DOMContentLoaded', () => { - (document.querySelectorAll('.notification .delete') || []).forEach(($delete) => { + (document.querySelectorAll('.notification .delete:not(.js-delete-excluded)') || []).forEach(($delete) => { const $notification = $delete.parentNode; $delete.addEventListener('click', () => { diff --git a/src/fellchensammlung/templates/fellchensammlung/partials/partial-notification.html b/src/fellchensammlung/templates/fellchensammlung/partials/partial-notification.html index e3dd5a3..0eaa7be 100644 --- a/src/fellchensammlung/templates/fellchensammlung/partials/partial-notification.html +++ b/src/fellchensammlung/templates/fellchensammlung/partials/partial-notification.html @@ -1,12 +1,14 @@ {% load i18n %} {% load custom_tags %} -
-
- {% csrf_token %} - - - -
+
+ {% if not notification.read %} +
+ {% csrf_token %} + + + +
+ {% endif %}
{{ notification.title }} {{ notification.created_at|time_since_hr }}