Skip to content
Snippets Groups Projects
Commit 4ac5f7ad authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Merge branch '540-fix-notifications-on-the-dashboard' into 'master'

Resolve "Fix notifications on the dashboard"

Closes #540

See merge request !785
parents 37719f27 6e800bb9
No related branches found
No related tags found
1 merge request!785Resolve "Fix notifications on the dashboard"
Pipeline #41895 canceled
......@@ -13,6 +13,8 @@ Fixed
~~~~~
* Use new MaterializeCSS fork because the old version is no longer maintained.
* Sender wasn't displayed for notifications on dashboard.
* Notifications and activities on dashboard weren't sorted from old to new.
`2.1.1`_ - 2021-11-14
---------------------
......
......@@ -85,7 +85,7 @@
<ul class="collection">
{% for notification in notifications %}
<li class="collection-item">
<span class="badge new primary-color">{{ notification.app }}</span>
<span class="badge new primary-color">{{ notification.sender }}</span>
<span class="title">{{ notification.title }}</span>
<p>
<i class="material-icons left">access_time</i> {{ notification.created }}
......
......@@ -184,9 +184,9 @@ def index(request: HttpRequest) -> HttpResponse:
person = DummyPerson()
widgets = []
activities = person.activities.all()[:5]
notifications = person.notifications.all()[:5]
unread_notifications = person.notifications.all().filter(read=False)
activities = person.activities.all().order_by("-created")[:5]
notifications = person.notifications.all().order_by("-created")[:5]
unread_notifications = person.notifications.all().filter(read=False).order_by("-created")
context["activities"] = activities
context["notifications"] = notifications
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment