comparison sat_templates/templates/bulma/chat/chat.html @ 365:9860286068b9

chat/chat.html: display date when there is a date change between 2 messages
author Goffi <goffi@goffi.org>
date Wed, 28 Jun 2023 10:40:53 +0200
parents 095bd5b34080
children 941e4006ab6e
comparison
equal deleted inserted replaced
364:095bd5b34080 365:9860286068b9
26 </div> 26 </div>
27 27
28 <!-- Messages --> 28 <!-- Messages -->
29 <div id="messages" class="box p-4 has-background-white mb-4 is-flex-grow-1 is-flex-direction-column-reverse is-overflow-auto"> 29 <div id="messages" class="box p-4 has-background-white mb-4 is-flex-grow-1 is-flex-direction-column-reverse is-overflow-auto">
30 {% for msg in messages %} 30 {% for msg in messages %}
31 {% set current_date = msg.timestamp|date_fmt('full', date_only=True) %}
32 {% if loop.changed(current_date) %}
33 <div class="separator">
34 <hr class="has-background-light" />
35 <span class="has-text-grey is-size-7">{{current_date}}</span>
36 <hr class="has-background-light" />
37 </div>
38 {% endif %}
31 {% include 'chat/message.html' %} 39 {% include 'chat/message.html' %}
32 {% endfor %} 40 {% endfor %}
33 </div> 41 </div>
34 42
35 <!-- Attachments --> 43 <!-- Attachments -->