From 30faa9e13c9d8973e8b8d7cf7f058c041c0af765 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Pav=C3=A3o?= Date: Fri, 3 May 2024 15:17:29 +0200 Subject: [PATCH 1/8] Correct typo in submission_upload.tag --- src/static/riot/competitions/detail/submission_upload.tag | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/static/riot/competitions/detail/submission_upload.tag b/src/static/riot/competitions/detail/submission_upload.tag index 75ecc8b2f..49fe64f01 100644 --- a/src/static/riot/competitions/detail/submission_upload.tag +++ b/src/static/riot/competitions/detail/submission_upload.tag @@ -61,7 +61,7 @@ From 331aaf088cbd079c3cb2699f42d40d93c714915e Mon Sep 17 00:00:00 2001 From: Benjamin Bearce Date: Sun, 19 May 2024 21:32:53 -0400 Subject: [PATCH 2/8] save comp to persist logo_icon --- src/apps/competitions/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/apps/competitions/models.py b/src/apps/competitions/models.py index 48c26bec4..2e0cb7336 100644 --- a/src/apps/competitions/models.py +++ b/src/apps/competitions/models.py @@ -261,8 +261,10 @@ def save(self, *args, **kwargs): pass elif not self.logo_icon: self.make_logo_icon() + self.save() elif os.path.dirname(self.logo.name) != os.path.dirname(self.logo_icon.name): self.make_logo_icon() + self.save() to_create = User.objects.filter( Q(id=self.created_by_id) | Q(id__in=self.collaborators.all().values_list('id', flat=True)) ).exclude(id__in=self.participants.values_list('user_id', flat=True)).distinct() From 12378e15ddd66fa59a79cbe976138b06ad391dd4 Mon Sep 17 00:00:00 2001 From: Benjamin Bearce Date: Mon, 20 May 2024 20:32:22 -0400 Subject: [PATCH 3/8] Files tab, conditional rendering --- src/static/riot/competitions/detail/_tabs.tag | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/static/riot/competitions/detail/_tabs.tag b/src/static/riot/competitions/detail/_tabs.tag index 1a9769790..6c3fff6f8 100644 --- a/src/static/riot/competitions/detail/_tabs.tag +++ b/src/static/riot/competitions/detail/_tabs.tag @@ -33,7 +33,7 @@ data-tab="_tab_page_term"> Terms -
+
Files
From ff89c663a072c6a376e29345a9fcf99a3d3b55d9 Mon Sep 17 00:00:00 2001 From: Kamal Das Date: Wed, 22 May 2024 20:51:03 +0530 Subject: [PATCH 4/8] email templates updated --- src/templates/emails/base_email.html | 41 +++++++++++++++---- .../organizer/participation_accepted.html | 7 +--- .../organizer/participation_accepted.txt | 8 ++-- .../organizer/participation_denied.html | 7 +--- .../organizer/participation_denied.txt | 8 ++-- .../organizer/participation_requested.html | 6 +-- .../organizer/participation_requested.txt | 8 ++-- .../participant/participation_accepted.html | 9 ++-- .../participant/participation_accepted.txt | 12 +++--- .../participant/participation_denied.html | 11 +++-- .../participant/participation_denied.txt | 15 ++++--- .../participant/participation_requested.html | 8 +++- .../participant/participation_requested.txt | 12 ++++-- 13 files changed, 94 insertions(+), 58 deletions(-) diff --git a/src/templates/emails/base_email.html b/src/templates/emails/base_email.html index 903e75e33..8d89f0b07 100644 --- a/src/templates/emails/base_email.html +++ b/src/templates/emails/base_email.html @@ -22,8 +22,27 @@ background-color: #f7f7f7; font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; } - body { - /*padding: 20px;*/ + .container { + width: 100%; + max-width: 600px; + margin: auto; + border: 1px solid #dddddd; + background-color: #ffffff; + } + .header_img { + width: 40%; + } + .header { + width: 100%; + background-color: #2D3E4C; + min-height: 110px; + display: flex; + justify-content: center; + align-items: center; + margin-bottom: 10px; + } + .content{ + padding: 20px; } h1 { font-size: 41px; @@ -57,6 +76,7 @@ color: #ccc; font-size: 11px; line-height: 18px; + text-align: center; } blockquote { color: #555555; @@ -78,27 +98,34 @@ +
+
+ codabench +
+
+

Hello{% if user %} {{ user.username }}{% endif %},

- {% block title %} {% endblock %} {% block content %} +

We're thrilled to inform you that your application for the + {{ participant.competition.title }} + competition has been accepted. Get ready to showcase your skills and compete with other talented individuals.

+

We look forward to seeing your participation.

{% endblock %} {% if not mass_email %}

Thanks,

-

Codabench Team

{% endif %} - +
+
diff --git a/src/templates/emails/participation/organizer/participation_accepted.html b/src/templates/emails/participation/organizer/participation_accepted.html index 703744f68..f25d3dfc9 100644 --- a/src/templates/emails/participation/organizer/participation_accepted.html +++ b/src/templates/emails/participation/organizer/participation_accepted.html @@ -1,9 +1,6 @@ {% extends 'emails/base_email.html' %} {% block content %} -

The user {{ participant.user.username }} was accepted into your competition:

- {{ participant.competition.title }} - -

Participants can be managed from the admin tab of your competition

+

We're writing to inform you that user {{ participant.user.username }} has been accepted into your competition + {{ participant.competition.title }}.You can manage all participants from the admin panel of your competition.

{% endblock %} diff --git a/src/templates/emails/participation/organizer/participation_accepted.txt b/src/templates/emails/participation/organizer/participation_accepted.txt index 4d1669e44..f25d3dfc9 100644 --- a/src/templates/emails/participation/organizer/participation_accepted.txt +++ b/src/templates/emails/participation/organizer/participation_accepted.txt @@ -1,8 +1,6 @@ -{% extends 'emails/base_email.txt' %} +{% extends 'emails/base_email.html' %} {% block content %} -The user {{ participant.user.username }} was accepted into your competition: -{{ participant.competition.title }} -> http://{{ site.domain }}{{ participant.competition.get_absolute_url }} - -Participants can be managed from the admin tab of your competition +

We're writing to inform you that user {{ participant.user.username }} has been accepted into your competition + {{ participant.competition.title }}.You can manage all participants from the admin panel of your competition.

{% endblock %} diff --git a/src/templates/emails/participation/organizer/participation_denied.html b/src/templates/emails/participation/organizer/participation_denied.html index 5eb320e01..43ec224c0 100644 --- a/src/templates/emails/participation/organizer/participation_denied.html +++ b/src/templates/emails/participation/organizer/participation_denied.html @@ -1,9 +1,6 @@ {% extends 'emails/base_email.html' %} {% block content %} -

The user {{ participant.user.username }} was denied permission to your competition:

- {{ participant.competition.title }} - -

Participants can be managed from the admin tab of your competition.

+

We're writing to inform you that user {{ participant.user.username }} has been denied to your competition + {{ participant.competition.title }}.You can manage all participants from the admin panel of your competition.

{% endblock %} diff --git a/src/templates/emails/participation/organizer/participation_denied.txt b/src/templates/emails/participation/organizer/participation_denied.txt index babba7aac..43ec224c0 100644 --- a/src/templates/emails/participation/organizer/participation_denied.txt +++ b/src/templates/emails/participation/organizer/participation_denied.txt @@ -1,8 +1,6 @@ -{% extends 'emails/base_email.txt' %} +{% extends 'emails/base_email.html' %} {% block content %} -The user {{ participant.user.username }} was revoked permission to your competition: -{{ participant.competition.title }} -> http://{{ site.domain }}{{ participant.competition.get_absolute_url }} - -Participants can be managed from the admin tab of your competition +

We're writing to inform you that user {{ participant.user.username }} has been denied to your competition + {{ participant.competition.title }}.You can manage all participants from the admin panel of your competition.

{% endblock %} diff --git a/src/templates/emails/participation/organizer/participation_requested.html b/src/templates/emails/participation/organizer/participation_requested.html index 87b79dbf3..dad10d911 100644 --- a/src/templates/emails/participation/organizer/participation_requested.html +++ b/src/templates/emails/participation/organizer/participation_requested.html @@ -1,8 +1,6 @@ {% extends 'emails/base_email.html' %} {% block content %} -

The user {{ participant.user.username }} requested access to your competition:

- {{ participant.competition.title }} -

Participants can be managed from the admin tab of your competition

+

We're writing to inform you that user {{ participant.user.username }} has requested access to your competition + {{ participant.competition.title }}.You can manage all participants from the admin panel of your competition.

{% endblock %} diff --git a/src/templates/emails/participation/organizer/participation_requested.txt b/src/templates/emails/participation/organizer/participation_requested.txt index e72c1b72a..dad10d911 100644 --- a/src/templates/emails/participation/organizer/participation_requested.txt +++ b/src/templates/emails/participation/organizer/participation_requested.txt @@ -1,8 +1,6 @@ -{% extends 'emails/base_email.txt' %} +{% extends 'emails/base_email.html' %} {% block content %} -The user {{ participant.user.username }} requested access to your competition: -{{ participant.competition.title }} -> http://{{ site.domain }}{{ participant.competition.get_absolute_url }} - -Participants can be managed from the admin tab of your competition +

We're writing to inform you that user {{ participant.user.username }} has requested access to your competition + {{ participant.competition.title }}.You can manage all participants from the admin panel of your competition.

{% endblock %} diff --git a/src/templates/emails/participation/participant/participation_accepted.html b/src/templates/emails/participation/participant/participation_accepted.html index 3db6a7e9b..27a0ddfd9 100644 --- a/src/templates/emails/participation/participant/participation_accepted.html +++ b/src/templates/emails/participation/participant/participation_accepted.html @@ -1,8 +1,11 @@ {% extends 'emails/base_email.html' %} {% block content %} -

This is a message updating your access to the competition:

+

We're thrilled to inform you that your application for the {{ participant.competition.title }} - -

Your status has been accepted!

+ competition has been accepted. Get ready to showcase your skills and compete with other talented individuals.

+

We look forward to seeing your participation.

{% endblock %} + + + diff --git a/src/templates/emails/participation/participant/participation_accepted.txt b/src/templates/emails/participation/participant/participation_accepted.txt index 04a0f8702..27a0ddfd9 100644 --- a/src/templates/emails/participation/participant/participation_accepted.txt +++ b/src/templates/emails/participation/participant/participation_accepted.txt @@ -1,9 +1,11 @@ -{% extends 'emails/base_email.txt' %} +{% extends 'emails/base_email.html' %} {% block content %} -This is a message updating your access to the competition: -{{ participant.competition.title }} -> http://{{ site.domain }}{{ participant.competition.get_absolute_url }} +

We're thrilled to inform you that your application for the + {{ participant.competition.title }} + competition has been accepted. Get ready to showcase your skills and compete with other talented individuals.

+

We look forward to seeing your participation.

+{% endblock %} + -Your status has been accepted! -{% endblock %} diff --git a/src/templates/emails/participation/participant/participation_denied.html b/src/templates/emails/participation/participant/participation_denied.html index 8a08d054f..23d4701be 100644 --- a/src/templates/emails/participation/participant/participation_denied.html +++ b/src/templates/emails/participation/participant/participation_denied.html @@ -1,9 +1,14 @@ {% extends 'emails/base_email.html' %} {% block content %} -

This is a message updating your access to the competition:

+

We're writing to inform you about your application for the {{ participant.competition.title }} - -

Your participation privileges have been denied.

+ competition. While your application was carefully considered, we regret to inform you that your participation privileges + have been denied. We encourage you to review the competition details and rules to see if there are areas where you can + improve your application for future competitions.

+

Thank you for your interest in the competition. We wish you the best of luck in your future endeavors. +

{% endblock %} + + diff --git a/src/templates/emails/participation/participant/participation_denied.txt b/src/templates/emails/participation/participant/participation_denied.txt index 13e72711e..23d4701be 100644 --- a/src/templates/emails/participation/participant/participation_denied.txt +++ b/src/templates/emails/participation/participant/participation_denied.txt @@ -1,9 +1,14 @@ -{% extends 'emails/base_email.txt' %} +{% extends 'emails/base_email.html' %} {% block content %} -This is a message updating your access to the competition: -{{ participant.competition.title }} -> http://{{ site.domain }}{{ participant.competition.get_absolute_url }} - -Your participation privileges have been denied. +

We're writing to inform you about your application for the + {{ participant.competition.title }} + competition. While your application was carefully considered, we regret to inform you that your participation privileges + have been denied. We encourage you to review the competition details and rules to see if there are areas where you can + improve your application for future competitions.

+

Thank you for your interest in the competition. We wish you the best of luck in your future endeavors. +

{% endblock %} + + diff --git a/src/templates/emails/participation/participant/participation_requested.html b/src/templates/emails/participation/participant/participation_requested.html index 3e1f98098..582d174b5 100644 --- a/src/templates/emails/participation/participant/participation_requested.html +++ b/src/templates/emails/participation/participant/participation_requested.html @@ -1,8 +1,12 @@ {% extends 'emails/base_email.html' %} {% block content %} -

This is a message confirming you have requested access to the competition:

+

Thanks for your interest in the {{ participant.competition.title }} + competition. We have received your request to participate.

-

You will be notified if your participation status is approved or denied.

+

We will carefully review your application and notify you by email regarding your participation status (accepted or denied). + In the meantime, you can review the competition details and rules to familiarize yourself with the challenge.

+ +

We look forward to your participation!

{% endblock %} diff --git a/src/templates/emails/participation/participant/participation_requested.txt b/src/templates/emails/participation/participant/participation_requested.txt index 2a208fe0b..582d174b5 100644 --- a/src/templates/emails/participation/participant/participation_requested.txt +++ b/src/templates/emails/participation/participant/participation_requested.txt @@ -1,8 +1,12 @@ -{% extends 'emails/base_email.txt' %} +{% extends 'emails/base_email.html' %} {% block content %} -This is a message confirming you have requested access to the competition: -{{ participant.competition }} -> http://{{ site.domain }}{{ participant.competition.get_absolute_url }} +

Thanks for your interest in the + {{ participant.competition.title }} + competition. We have received your request to participate.

-You will be notified if your participation status is approved or denied. +

We will carefully review your application and notify you by email regarding your participation status (accepted or denied). + In the meantime, you can review the competition details and rules to familiarize yourself with the challenge.

+ +

We look forward to your participation!

{% endblock %} From ff5bf53ce08ef4920b3d4e0fde3a01b26a0f249e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Pav=C3=A3o?= Date: Thu, 23 May 2024 12:12:40 +0200 Subject: [PATCH 5/8] Update base_email.html --- src/templates/emails/base_email.html | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/src/templates/emails/base_email.html b/src/templates/emails/base_email.html index 8d89f0b07..e0a00e5ca 100644 --- a/src/templates/emails/base_email.html +++ b/src/templates/emails/base_email.html @@ -7,15 +7,6 @@