Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

account: customize welcome e-mail #290

Merged
merged 1 commit into from
Sep 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sonar/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ def _(x):
#: Email address used as sender of account registration emails.
SECURITY_EMAIL_SENDER = SUPPORT_EMAIL
#: Email subject for account registration emails.
SECURITY_EMAIL_SUBJECT_REGISTER = _("Welcome to Swiss Open Access Repository!")
SECURITY_EMAIL_SUBJECT_REGISTER = _(
'Welcome to SONAR, the Swiss Open Access Repository!')
#: Redis session storage URL.
ACCOUNTS_SESSION_REDIS_URL = 'redis://localhost:6379/1'
#: Enable session/user id request tracing. This feature will add X-Session-ID
Expand Down Expand Up @@ -453,8 +454,7 @@ def _(x):
document_type=dict(terms=dict(field='documentType')),
controlled_affiliation=dict(terms=dict(
field='contribution.controlledAffiliation.raw')),
author=dict(terms=dict(
field='contribution.agent.preferred_name.raw')),
author=dict(terms=dict(field='contribution.agent.preferred_name.raw')),
year=dict(date_histogram=dict(
field='provisionActivity.startDate',
interval='year',
Expand Down
14 changes: 14 additions & 0 deletions sonar/templates/security/email/welcome.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<p>{{ _('Dear %(email)s', email=user.email) }},</p>

{% if security.confirmable %}
<p>
{{ _('Please confirm your e-mail by clicking here') }}: <a href="{{ confirmation_link }}">{{ _('Confirm e-mail') }}</a>
</p>
{% endif %}
<p>{{ _('To be able to deposit publications, you must be registered against a SONAR institution. For now, your account does not provide additional features, but in the future you will be able to create document lists and save requests.') }}</p>
<p>{{ _('Best regards') }}</p>
<p>{{ _('The SONAR team at RERO') }}</p>

{{ _('E-mail') }}: <a href="mailto:info.sonar@rero.ch">info.sonar@rero.ch</a><br>
<a href="https://www.sonar.ch/" target="_blank">https://www.sonar.ch/</a><br>
<a href="https://www.rero.ch" target="_blank">https://www.rero.ch</a>