-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
253 additions
and
151 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
40 changes: 24 additions & 16 deletions
40
Notifications/templates/Notifications/notificationIcon.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,33 @@ | ||
<div | ||
class="nav-item bellIcon d-flex justify-content-center align-items-center"> | ||
<a data-bs-target=".notificationDropdown" | ||
class="nav-item bellIcon mx-lg-5 | ||
{% if notifications %}dropdownParent hoverScale {% endif %} "> | ||
<a | ||
|
||
{% if notifications %} data-bs-target=".notificationDropdown" | ||
data-bs-toggle="collapse" | ||
aria-haspopup="true" | ||
aria-expanded="false" | ||
hx-trigger="every 800ms" | ||
|
||
class=" p-0 dropdown-toggle m-0"> | ||
{% endif %} | ||
class=" p-0 {% if notifications %} dropdown-toggle {% endif %} m-0 position-relative"> | ||
<i class="bi bi-bell-fill "></i> | ||
<span class="notifyAmount "> {{ notifications | length }} | ||
</span> | ||
</a> | ||
|
||
{# <div class="notificationDropdown dropdown-menu ">#} | ||
{# {% if notifications %}#} | ||
{# {% for item in notifications %}#} | ||
{# <h2>{{ item.message }}</h2>#} | ||
{# <h2>{{ item.timestamp }}</h2>#} | ||
<div class="notificationDropdown navDropdown dropdown-menu customScroll "> | ||
<a hx-delete="{% url 'clearNotifications' %}" | ||
hx-target="#notiParent" | ||
class="d-block font-weight-700 my-2 readAll hoverScale mx-5 mx-lg-0 ">Read All</a> | ||
|
||
{% if notifications %} | ||
{% for item in notifications %} | ||
<a href="{% url 'clubMembers' %}" | ||
class="notification d-block">{{ item.message }} {{ item.timestamp }}</a> | ||
{# <h2>{{ item.is_read }}</h2>#} | ||
{##} | ||
{# {% endfor %}#} | ||
{# {% endif %}#} | ||
{##} | ||
{# <h4>Show all notifications</h4>#} | ||
{# </div>#} | ||
|
||
{% endfor %} | ||
{% endif %} | ||
|
||
{# <a href="{% url 'allNotifications' %}">Show all notifications</a>#} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,23 @@ | ||
from django.shortcuts import render | ||
from .models import Notification | ||
|
||
|
||
# Create your views here. | ||
def notifications (request): | ||
myNotifications = Notification.objects.filter(userReceiver = request.user.id) | ||
|
||
|
||
context = { | ||
'notifications' : myNotifications | ||
} | ||
return render | ||
def notifi(request): | ||
return Notification.objects.filter(userReceiver=request.user.id) | ||
|
||
|
||
def notifications(request): | ||
return {'notifications': notifi(request)} | ||
|
||
|
||
def clearNotifications(request): | ||
if request.method == 'DELETE': | ||
myset = Notification.objects.filter(userReceiver=request.user) | ||
for x in myset: | ||
x.userReceiver.remove(request.user.id) | ||
|
||
|
||
return render(request, "Notifications/notificationIcon.html", {'notifications' : notifi(request)}) |
2 changes: 1 addition & 1 deletion
2
WorkoutJournal/templates/BJJournal/BJR_Techniques/BJR_Techniques_List.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
WorkoutJournal/templates/BJJournal/BJR_Techniques/BJR_Techniques_types.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
account_register/templates/myaccount/profile_reloadContent.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.