From ca5e1e017c8e4996462d25aa88e8af3881be7e7b Mon Sep 17 00:00:00 2001 From: Horilla Date: Thu, 14 Nov 2024 15:37:20 +0530 Subject: [PATCH] [UPDT] TEMPLATES: Notification mark as read and clear all section updated with more HTMX attributes --- templates/notification/all_notifications.html | 42 +-- .../notification/notification_items.html | 267 ++++++++---------- templates/settings.html | 4 +- 3 files changed, 147 insertions(+), 166 deletions(-) diff --git a/templates/notification/all_notifications.html b/templates/notification/all_notifications.html index fa247f4c9..9f994a6e4 100644 --- a/templates/notification/all_notifications.html +++ b/templates/notification/all_notifications.html @@ -1,23 +1,22 @@ {% load i18n %} {% get_current_language as LANGUAGE_CODE %} {% if messages %} -
- {% for message in messages %} -
- {{ message }} -
- {% endfor %} +
+ {% for message in messages %} +
+ {{ message }}
- {% endif %} + {% endfor %} +
+{% endif %}
    {% for notification in notifications %} -
  1. +
  2. - {{forloop.counter}}. {% if notification.unread %} - + {% endif %} {% if LANGUAGE_CODE == 'ar' %}

    {{ notification.data.verb_ar }}

    @@ -31,25 +30,28 @@

    {{ notification.verb }}

    {% endif %}
    -
    - -
    +
    + -
    +
    +
- {{ notification.timesince }} {% trans "ago by" %}User {{notification.actor}} - + {{ notification.timesince }} {% trans "ago by" %}User {{notification.actor}} + {% endfor %} - + diff --git a/templates/notification/notification_items.html b/templates/notification/notification_items.html index 0ca78d1f9..d34abecf0 100644 --- a/templates/notification/notification_items.html +++ b/templates/notification/notification_items.html @@ -1,158 +1,137 @@ -{% load i18n %} {% load static %} +{% load i18n %} {% load static %} {% get_current_language as LANGUAGE_CODE %} {% if messages %} -
- {% for message in messages %} -
{{ message }}
- {% endfor %} -
+
+ {% for message in messages %} +
{{ message }}
+ {% endfor %} +
{% endif %}
- {% trans "Notifications" %} - {% if notifications %} - - {% endif %} + {% trans "Notifications" %} + {% if notifications %} + + {% endif %}
-{% if notifications %} - -{% else %} -
- All caught up - {% trans "All caught up!" %} - {% trans "You have no new notifications at the moment." %} -
-{% endif %} + {% endif %}
diff --git a/templates/settings.html b/templates/settings.html index 5a16c2ab0..55e427f48 100644 --- a/templates/settings.html +++ b/templates/settings.html @@ -311,7 +311,7 @@ {% endif %}
- {% if perms.base.view_actiontype %} + {% if perms.employee.view_actiontype %}
- {% if perms.employee.view_emplyeetag %} + {% if perms.employee.view_employeetag %}