Skip to content

Commit 98b5138

Browse files
templates/notifications: fix broken nav with htmx get only if auth
1 parent 2f36a9b commit 98b5138

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

adhocracy-plus/templates/includes/header_notification_button.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
<a href="{% url 'userdashboard-notifications' %}"
55
class="btn btn-default position-relative rounded-circle notifications_btn d-flex align-items-center justify-content-center"
66
aria-label="Notifications"
7-
hx-get="{% url 'notification-count-partial' %}"
8-
hx-trigger="updateNotificationCount from:body, every 15s"
9-
hx-target=".notification-badge-container">
7+
{% if user.is_authenticated %}
8+
hx-get="{% url 'notification-count-partial' %}"
9+
hx-trigger="updateNotificationCount from:body, every 15s"
10+
hx-target=".notification-badge-container">
11+
{% endif %}>
1012

1113
<i class="fas fa-bell"></i>
1214
<span class="notification-badge-container">

0 commit comments

Comments
 (0)