# HG changeset patch # User Goffi # Date 1687941653 -7200 # Node ID 9860286068b94ef8a2cefdbf9b978442379b60a6 # Parent 095bd5b340800ebf8a7141fcdbf40638ad4e092f chat/chat.html: display date when there is a date change between 2 messages diff -r 095bd5b34080 -r 9860286068b9 sat_templates/templates/bulma/chat/chat.html --- a/sat_templates/templates/bulma/chat/chat.html Wed Jun 28 10:40:53 2023 +0200 +++ b/sat_templates/templates/bulma/chat/chat.html Wed Jun 28 10:40:53 2023 +0200 @@ -28,6 +28,14 @@
{% for msg in messages %} + {% set current_date = msg.timestamp|date_fmt('full', date_only=True) %} + {% if loop.changed(current_date) %} +
+
+ {{current_date}} +
+
+ {% endif %} {% include 'chat/message.html' %} {% endfor %}