-
Notifications
You must be signed in to change notification settings - Fork 22
Mc/3802/backend/notifications #3826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
lsabor
wants to merge
1
commit into
mc/3801/backend/scoring
Choose a base branch
from
mc/3802/backend/notifications
base: mc/3801/backend/scoring
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
109 changes: 109 additions & 0 deletions
109
notifications/templates/emails/multiple_choice_option_addition.mjml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| <mjml> | ||
| <mj-include path="../../../templates/emails/email_styles.mjml"/> | ||
|
|
||
| <mj-body> | ||
| <mj-include path="../../../templates/emails/email_top.mjml"/> | ||
|
|
||
| <mj-section background-color="#ffffff" padding-bottom="16px"> | ||
| <mj-column> | ||
| <mj-text font-size="16px" color="#161C22" padding-bottom="0px"> | ||
| Hello {{recipient.username}}, | ||
| </mj-text> | ||
| </mj-column> | ||
| </mj-section> | ||
|
|
||
| <!-- All dynamic content in ONE section --> | ||
| <mj-section background-color="#ffffff" padding="0px"> | ||
| <mj-column> | ||
| <mj-text padding="0px"> | ||
| <!-- Tournament/Project Status Changes --> | ||
| {% if params.from_projects %} | ||
|
|
||
| <!-- Intro text for tournament changes --> | ||
| <div style="font-size: 15px; color: #161C22; margin: 0px 24px 8px 24px;"> | ||
| {% blocktrans %} | ||
| These questions have changed status: | ||
| {% endblocktrans %} | ||
| </div> | ||
|
|
||
| {% for item in params.from_projects %} | ||
| {% if item.notifications %} | ||
|
|
||
| <div style="margin-bottom: 16px;"> | ||
| <div style="background-color: #EFF4F4; border: 1px solid #D7E4F2; border-radius: 8px; padding: 16px; margin: 0px 24px;"> | ||
| <!-- Project Header --> | ||
| <div style="font-size: 15px; color: #2F4155; margin-bottom: 12px;"> | ||
| {% blocktrans with project_name=item.project.name %} | ||
| In <b>{{project_name}}</b>: | ||
| {% endblocktrans %} | ||
| </div> | ||
|
|
||
| <!-- Questions in this project --> | ||
| {% for notification in item.notifications %} | ||
| <div style="{% if not forloop.last %}margin-bottom: 8px;{% endif %}"> | ||
| <a href="{% post_url notification.post.post_id notification.post.post_title notification.question.id notification.post.post_type %}" | ||
| style="display: block; text-decoration: none; color: inherit;"> | ||
| <div style="background-color: #ffffff; border: 1px solid #E5E7EB; border-radius: 6px; padding: 12px;"> | ||
| <div style="font-size: 14px; font-weight: 600; color: #161C22; line-height: 1.4; margin-bottom: 2px;"> | ||
| {{ notification.question.title|default:notification.post.post_title }} | ||
| </div> | ||
| {% if notification.post.post_type != 'notebook' %} | ||
| <div style="font-size: 13px; font-weight: 600; color: #758EA9;"> | ||
| is now {{ notification.event }} | ||
| </div> | ||
| {% endif %} | ||
| </div> | ||
| </a> | ||
| </div> | ||
| {% endfor %} | ||
| </div> | ||
| </div> | ||
|
|
||
| {% endif %} | ||
| {% endfor %} | ||
| {% endif %} | ||
|
|
||
| <!-- Regular Status Changes --> | ||
| {% if params.from_posts %} | ||
|
|
||
| <!-- Intro text --> | ||
| {% if params.from_projects %} | ||
| <div style="font-size: 15px; color: #161C22; margin: 0px 24px 8px 24px;"> | ||
| {% blocktrans %} | ||
| In the rest of Metaculus: | ||
| {% endblocktrans %} | ||
| </div> | ||
| {% endif %} | ||
|
|
||
| <div style="font-size: 15px; color: #161C22; margin: 0px 24px 8px 24px;"> | ||
| {% blocktrans with count=params.from_posts|length %} | ||
| These {{count}} questions have changed status: | ||
| {% endblocktrans %} | ||
| </div> | ||
|
|
||
| <!-- Question cards directly (no outer container) --> | ||
| {% for item in params.from_posts %} | ||
| <div style="margin: 0px 24px {% if not forloop.last %}8px{% else %}16px{% endif %} 24px;"> | ||
| <a href="{% post_url item.post.post_id item.post.post_title item.question.id item.post.post_type %}" | ||
| style="display: block; text-decoration: none; color: inherit;"> | ||
| <div style="background-color: #EFF4F4; border: 1px solid #D7E4F2; border-radius: 8px; padding: 12px;"> | ||
| <div style="font-size: 14px; font-weight: 500; color: #161C22; line-height: 1.4; margin-bottom: 2px;"> | ||
| {{ item.question.title|default:item.post.post_title }} | ||
| </div> | ||
| <div style="font-size: 13px; font-weight: 600; color: #758EA9;"> | ||
| is now {{ item.event }} | ||
| </div> | ||
| </div> | ||
| </a> | ||
| </div> | ||
| {% endfor %} | ||
|
|
||
| {% endif %} | ||
| </mj-text> | ||
| </mj-column> | ||
| </mj-section> | ||
|
|
||
| <mj-include path="../../../templates/emails/email_similar_questions.mjml"/> | ||
| <mj-include path="../../../templates/emails/email_unsubscribe.mjml"/> | ||
| </mj-body> | ||
| </mjml> |
109 changes: 109 additions & 0 deletions
109
notifications/templates/emails/multiple_choice_option_deletion.mjml
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. placeholder content |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| <mjml> | ||
| <mj-include path="../../../templates/emails/email_styles.mjml"/> | ||
|
|
||
| <mj-body> | ||
| <mj-include path="../../../templates/emails/email_top.mjml"/> | ||
|
|
||
| <mj-section background-color="#ffffff" padding-bottom="16px"> | ||
| <mj-column> | ||
| <mj-text font-size="16px" color="#161C22" padding-bottom="0px"> | ||
| Hello {{recipient.username}}, | ||
| </mj-text> | ||
| </mj-column> | ||
| </mj-section> | ||
|
|
||
| <!-- All dynamic content in ONE section --> | ||
| <mj-section background-color="#ffffff" padding="0px"> | ||
| <mj-column> | ||
| <mj-text padding="0px"> | ||
| <!-- Tournament/Project Status Changes --> | ||
| {% if params.from_projects %} | ||
|
|
||
| <!-- Intro text for tournament changes --> | ||
| <div style="font-size: 15px; color: #161C22; margin: 0px 24px 8px 24px;"> | ||
| {% blocktrans %} | ||
| These questions have changed status: | ||
| {% endblocktrans %} | ||
| </div> | ||
|
|
||
| {% for item in params.from_projects %} | ||
| {% if item.notifications %} | ||
|
|
||
| <div style="margin-bottom: 16px;"> | ||
| <div style="background-color: #EFF4F4; border: 1px solid #D7E4F2; border-radius: 8px; padding: 16px; margin: 0px 24px;"> | ||
| <!-- Project Header --> | ||
| <div style="font-size: 15px; color: #2F4155; margin-bottom: 12px;"> | ||
| {% blocktrans with project_name=item.project.name %} | ||
| In <b>{{project_name}}</b>: | ||
| {% endblocktrans %} | ||
| </div> | ||
|
|
||
| <!-- Questions in this project --> | ||
| {% for notification in item.notifications %} | ||
| <div style="{% if not forloop.last %}margin-bottom: 8px;{% endif %}"> | ||
| <a href="{% post_url notification.post.post_id notification.post.post_title notification.question.id notification.post.post_type %}" | ||
| style="display: block; text-decoration: none; color: inherit;"> | ||
| <div style="background-color: #ffffff; border: 1px solid #E5E7EB; border-radius: 6px; padding: 12px;"> | ||
| <div style="font-size: 14px; font-weight: 600; color: #161C22; line-height: 1.4; margin-bottom: 2px;"> | ||
| {{ notification.question.title|default:notification.post.post_title }} | ||
| </div> | ||
| {% if notification.post.post_type != 'notebook' %} | ||
| <div style="font-size: 13px; font-weight: 600; color: #758EA9;"> | ||
| is now {{ notification.event }} | ||
| </div> | ||
| {% endif %} | ||
| </div> | ||
| </a> | ||
| </div> | ||
| {% endfor %} | ||
| </div> | ||
| </div> | ||
|
|
||
| {% endif %} | ||
| {% endfor %} | ||
| {% endif %} | ||
|
|
||
| <!-- Regular Status Changes --> | ||
| {% if params.from_posts %} | ||
|
|
||
| <!-- Intro text --> | ||
| {% if params.from_projects %} | ||
| <div style="font-size: 15px; color: #161C22; margin: 0px 24px 8px 24px;"> | ||
| {% blocktrans %} | ||
| In the rest of Metaculus: | ||
| {% endblocktrans %} | ||
| </div> | ||
| {% endif %} | ||
|
|
||
| <div style="font-size: 15px; color: #161C22; margin: 0px 24px 8px 24px;"> | ||
| {% blocktrans with count=params.from_posts|length %} | ||
| These {{count}} questions have changed status: | ||
| {% endblocktrans %} | ||
| </div> | ||
|
|
||
| <!-- Question cards directly (no outer container) --> | ||
| {% for item in params.from_posts %} | ||
| <div style="margin: 0px 24px {% if not forloop.last %}8px{% else %}16px{% endif %} 24px;"> | ||
| <a href="{% post_url item.post.post_id item.post.post_title item.question.id item.post.post_type %}" | ||
| style="display: block; text-decoration: none; color: inherit;"> | ||
| <div style="background-color: #EFF4F4; border: 1px solid #D7E4F2; border-radius: 8px; padding: 12px;"> | ||
| <div style="font-size: 14px; font-weight: 500; color: #161C22; line-height: 1.4; margin-bottom: 2px;"> | ||
| {{ item.question.title|default:item.post.post_title }} | ||
| </div> | ||
| <div style="font-size: 13px; font-weight: 600; color: #758EA9;"> | ||
| is now {{ item.event }} | ||
| </div> | ||
| </div> | ||
| </a> | ||
| </div> | ||
| {% endfor %} | ||
|
|
||
| {% endif %} | ||
| </mj-text> | ||
| </mj-column> | ||
| </mj-section> | ||
|
|
||
| <mj-include path="../../../templates/emails/email_similar_questions.mjml"/> | ||
| <mj-include path="../../../templates/emails/email_unsubscribe.mjml"/> | ||
| </mj-body> | ||
| </mjml> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
placeholder content