Skip to content

Commit

Permalink
Merge pull request #10710 from Johnetordoff/fix-preprint-emails
Browse files Browse the repository at this point in the history
[ENG-6138] Update Language for Preprint Resubmission Emails
  • Loading branch information
Johnetordoff authored Aug 22, 2024
2 parents a9e1ab2 + 8a19a14 commit 2f8d96b
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 37 deletions.
1 change: 1 addition & 0 deletions osf/utils/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def notify_submit(resource, user, *args, **kwargs):
def notify_resubmit(resource, user, *args, **kwargs):
context = get_email_template_context(resource)
context['referrer'] = user
context['resubmission'] = True
recipients = list(resource.contributors)
reviews_signals.reviews_email_submit.send(
recipients=recipients,
Expand Down
5 changes: 4 additions & 1 deletion website/reviews/listeners.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ def reviews_submit_notification_moderators(self, timestamp, context):
context['message'] = f'submitted updates to "{resource.title}".'
context['reviews_submission_url'] += f'&revisionId={revision_id}'
else:
context['message'] = f'submitted "{resource.title}".'
if context.get('resubmission'):
context['message'] = f'resubmitted "{resource.title}".'
else:
context['message'] = f'submitted "{resource.title}".'

# Get NotificationSubscription instance, which contains reference to all subscribers
provider_subscription, created = NotificationSubscription.objects.get_or_create(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,39 +1,42 @@
## -*- coding: utf-8 -*-
<div style="margin: 40px;">
<p>Hello ${referrer.fullname},</p>
<p>
The ${document_type}
<a href="${reviewable.absolute_url}">${reviewable.title}</a>
has been successfully re-submitted to ${reviewable.provider.name}.
</p>
<p>
${reviewable.provider.name} has chosen to moderate their submissions using a
pre-moderation workflow, which means your submission is pending until accepted
by a moderator.
<%inherit file="notify_base.mako"/>
<%def name="content()">
<div style="margin: 40px;">
<p>
Hello ${referrer.fullname},
</p>
<p>
The ${document_type} <a href="${reviewable.absolute_url}">${reviewable.title}</a> has been successfully
resubmitted to ${reviewable.provider.name}.
</p>
<p>
${reviewable.provider.name} has chosen to moderate their submissions using a pre-moderation workflow, which
means your submission is pending until accepted by a moderator.
% if not no_future_emails:
You will receive a separate notification informing you of any status changes.
% endif
</p>
<p>
You will ${'not receive ' if no_future_emails else 'be automatically subscribed to '}future
notification emails for this ${document_type}.
</p>
<p>
If you have been erroneously associated with "${reviewable.title}", then you
may visit the ${document_type}'s "Edit" page and remove yourself as a contributor.
</p>
<p>
For more information about ${reviewable.provider.name}, visit
<a href="${provider_url}">${provider_url}</a> to learn more. To learn about the
Open Science Framework, visit <a href="https://osf.io/">https://osf.io/</a>.
</p>
<p>For questions regarding submission criteria, please email ${provider_contact_email}</p>
<br>
Sincerely,<br>
Your ${reviewable.provider.name} and OSF teams
<p>
Center for Open Science<br>
210 Ridge McIntire Road, Suite 500, Charlottesville, VA 22903
</p>
<a href="https://github.com/CenterForOpenScience/cos.io/blob/master/PRIVACY_POLICY.md">Privacy Policy</a>
</div>
</p>
<p>
You will ${'not receive ' if no_future_emails else 'be automatically subscribed to '}future notification emails
for this ${document_type}.
</p>
<p>
If you have been erroneously associated with "${reviewable.title}", then you may visit the ${document_type}'s
"Edit" page and remove yourself as a contributor.
</p>
<p>
For more information about ${reviewable.provider.name}, visit <a href="${provider_url}">${provider_url}</a> to
learn more. To learn about the Open Science Framework, visit <a href=" "> </a>.
</p>
<p>
For questions regarding submission criteria, please email ${provider_contact_email}
</p>
<br>
Sincerely,
<br>
Your ${reviewable.provider.name} and OSF teams
<p>
Center for Open Science<br> 210 Ridge McIntire Road, Suite 500, Charlottesville, VA 22903
</p>
<a href="https://github.com/CenterForOpenScience/cos.io/blob/master/PRIVACY_POLICY.md">Privacy Policy</a>
</div>
</%def>

0 comments on commit 2f8d96b

Please sign in to comment.