From 4ad5671e86b2173572e3c1f985f58975ed484167 Mon Sep 17 00:00:00 2001 From: origabai Date: Sat, 30 Aug 2025 23:54:27 +0300 Subject: [PATCH] changed communication layout so messages sent to users appear at the top --- .../contest/templates/communication.html | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/cms/server/contest/templates/communication.html b/cms/server/contest/templates/communication.html index 13231fb52b..82efbbf056 100644 --- a/cms/server/contest/templates/communication.html +++ b/cms/server/contest/templates/communication.html @@ -29,6 +29,25 @@

{% trans %}(no subject){% endtrans %}

{% endif %} +{% if participation.messages|length > 0 %} +

{% trans %}Messages{% endtrans %}

+
+ {% for msg in participation.messages|reverse %} +
+ {% if msg.subject|length > 0 %} +

{{ msg.subject }}

+ {% else %} +

{% trans %}(no subject){% endtrans %}

+ {% endif %} + {{ msg.timestamp|format_datetime_smart }} + {% if msg.text|length > 0 %} +
{{ msg.text | markdown }}
+ {% endif %} +
+ {% endfor %} +
+{% endif %} + {% if questions_enabled %} @@ -106,24 +125,7 @@

{% trans %}(no subject){% endtrans %}

{% endif %} -{% if participation.messages|length > 0 %} -

{% trans %}Messages{% endtrans %}

-
- {% for msg in participation.messages|reverse %} -
- {% if msg.subject|length > 0 %} -

{{ msg.subject }}

- {% else %} -

{% trans %}(no subject){% endtrans %}

- {% endif %} - {{ msg.timestamp|format_datetime_smart }} - {% if msg.text|length > 0 %} -
{{ msg.text | markdown }}
- {% endif %} -
- {% endfor %} -
-{% endif %} +