From 2b92af5a0d448a1691d5745ad9188519e699df54 Mon Sep 17 00:00:00 2001 From: nitely Date: Sat, 3 Oct 2020 06:17:42 -0300 Subject: [PATCH] revert #292 --- spirit/core/templates/spirit/_base.html | 2 +- .../spirit/topic/notification/_top_bar.html | 30 +++++- .../spirit/topic/notification/index.html | 2 +- .../topic/notification/index_unread.html | 29 ++++++ spirit/topic/notification/tests.py | 94 +++++++++---------- spirit/topic/notification/urls.py | 1 + spirit/topic/notification/views.py | 26 ++++- 7 files changed, 126 insertions(+), 58 deletions(-) create mode 100644 spirit/topic/notification/templates/spirit/topic/notification/index_unread.html diff --git a/spirit/core/templates/spirit/_base.html b/spirit/core/templates/spirit/_base.html index a7d03d2b2..ba87c986e 100644 --- a/spirit/core/templates/spirit/_base.html +++ b/spirit/core/templates/spirit/_base.html @@ -25,7 +25,7 @@ {% if user.is_authenticated %} stModules.notification(document.querySelectorAll('.js-tab-notification'), { notificationUrl: "{% url "spirit:topic:notification:index-ajax" %}", - notificationListUrl: "{% url "spirit:topic:notification:index" %}", + notificationListUrl: "{% url "spirit:topic:notification:index-unread" %}", mentionTxt: "{% trans "{user} has mention you on {topic}" %}", commentTxt: "{% trans "{user} has commented on {topic}" %}", showAll: "{% trans "Show all" %}", diff --git a/spirit/topic/notification/templates/spirit/topic/notification/_top_bar.html b/spirit/topic/notification/templates/spirit/topic/notification/_top_bar.html index 7cd21dc66..6577ee960 100644 --- a/spirit/topic/notification/templates/spirit/topic/notification/_top_bar.html +++ b/spirit/topic/notification/templates/spirit/topic/notification/_top_bar.html @@ -1,9 +1,35 @@ {% load i18n %}
-