From ab66687a1960aedb05cbf117413cf13a76e808bc Mon Sep 17 00:00:00 2001 From: sundasnoreen12 Date: Tue, 7 May 2024 12:36:47 +0500 Subject: [PATCH 1/4] fix: added fix based on recent master changes --- .../notifications/digest_header.html | 63 ++++++++++--------- 1 file changed, 34 insertions(+), 29 deletions(-) diff --git a/openedx/core/djangoapps/notifications/templates/notifications/digest_header.html b/openedx/core/djangoapps/notifications/templates/notifications/digest_header.html index 82077e37c0fd..1f0a533aea54 100644 --- a/openedx/core/djangoapps/notifications/templates/notifications/digest_header.html +++ b/openedx/core/djangoapps/notifications/templates/notifications/digest_header.html @@ -38,35 +38,40 @@ {% for update in email_digest_updates %} - -

- - - - - - - - - -
- {{update.count}} -
- {{update.title}} -
-

- - {% endfor %} - + {% if forloop.last or forloop.revcounter0 == 1 %} + {% if email_digest_updates|length|add:'1'|divisibleby:3 and not forloop.last%} + + {% elif email_digest_updates|length|add:'2'|divisibleby:3 and forloop.last%} + + {% endif %} + {% endif %} + +

+ + + + + + + + + +
+ {{update.count}} +
+ {{update.title}} +
+

+ + {% if forloop.counter|divisibleby:3 %} + + {% endif %} + {% endfor %} From f976266b21a01cb8d16eb6f194a48efc252bdef1 Mon Sep 17 00:00:00 2001 From: sundasnoreen12 Date: Thu, 9 May 2024 13:46:46 +0500 Subject: [PATCH 2/4] refactor: paragraph tag is not holding children in email template --- .../notifications/digest_header.html | 48 +++++++------------ 1 file changed, 17 insertions(+), 31 deletions(-) diff --git a/openedx/core/djangoapps/notifications/templates/notifications/digest_header.html b/openedx/core/djangoapps/notifications/templates/notifications/digest_header.html index 1f0a533aea54..9791201b5dc3 100644 --- a/openedx/core/djangoapps/notifications/templates/notifications/digest_header.html +++ b/openedx/core/djangoapps/notifications/templates/notifications/digest_header.html @@ -38,39 +38,25 @@ {% for update in email_digest_updates %} - {% if forloop.last or forloop.revcounter0 == 1 %} - {% if email_digest_updates|length|add:'1'|divisibleby:3 and not forloop.last%} - - {% elif email_digest_updates|length|add:'2'|divisibleby:3 and forloop.last%} - - {% endif %} - {% endif %} - -

- - - - - - - - - -
- {{update.count}} -
- {{update.title}} -
-

+ + + + + + + + + + +
+ {{update.count}} +
+ {{update.title}} +
{% if forloop.counter|divisibleby:3 %} - - {% endif %} + + {% endif %} {% endfor %} From 7789923d21836e2b537cac2e80e3cf4c986f3b77 Mon Sep 17 00:00:00 2001 From: sundasnoreen12 Date: Fri, 10 May 2024 12:59:03 +0500 Subject: [PATCH 3/4] refactor: added tr tags --- .../notifications/templates/notifications/digest_header.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openedx/core/djangoapps/notifications/templates/notifications/digest_header.html b/openedx/core/djangoapps/notifications/templates/notifications/digest_header.html index 9791201b5dc3..9d731e35528a 100644 --- a/openedx/core/djangoapps/notifications/templates/notifications/digest_header.html +++ b/openedx/core/djangoapps/notifications/templates/notifications/digest_header.html @@ -55,7 +55,9 @@ {% if forloop.counter|divisibleby:3 %} - + + {% elif forloop.last %} + {% endif %} {% endfor %} From 2c4e039313312e9baad95f85e816509e546b6b2f Mon Sep 17 00:00:00 2001 From: sundasnoreen12 Date: Fri, 10 May 2024 14:50:30 +0500 Subject: [PATCH 4/4] fix: moved tr outside forloop --- .../notifications/templates/notifications/digest_header.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openedx/core/djangoapps/notifications/templates/notifications/digest_header.html b/openedx/core/djangoapps/notifications/templates/notifications/digest_header.html index 9d731e35528a..7957524e8ae2 100644 --- a/openedx/core/djangoapps/notifications/templates/notifications/digest_header.html +++ b/openedx/core/djangoapps/notifications/templates/notifications/digest_header.html @@ -56,10 +56,9 @@ {% if forloop.counter|divisibleby:3 %} - {% elif forloop.last %} - {% endif %} {% endfor %} +