*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
curation-request.accept.jinja 4.01 KiB
Newer Older
{%- set curation_request = notification.context.request %}
{%- set group = curation_request.receiver %}
{%- set creator = curation_request.created_by %}
{%- set record = curation_request.topic %}
{%- set request_id = curation_request.id %}
{%- set executing_user = notification.context.executing_user %}
{%- set message = notification.context.message | safe if notification.context.message else '' %}
{%- set record_title = record.metadata.title %}
{%- set deposit_form_url = record.links.self_html.replace("/records/", "/uploads/") %}
{%- set curator_name = executing_user.username or executing_user.profile.full_name %}

{# TODO: use request.links.self_html when issue issue is resolved: https://github.com/inveniosoftware/invenio-rdm-records/issues/1327 #}
{%- set request_link = "{ui}/me/requests/{id}".format(ui=config.SITE_UI_URL, id=request_id) %}
{%- set account_settings_link = "{ui}/account/settings/notifications".format(ui=config.SITE_UI_URL) %}

{#- Subject for emails -#}
{%- block subject -%}
    {{ _("✅ Curation request accepted for '{record_title}'").format(record_title=record_title) }}
{%- endblock subject -%}

{#- HTML body for emails -#}
<p>
    {{ _('Good news: Your dataset was accepted, and you can now publish it yourself via <a href="%(deposit_form_url)s">its upload form</a>!', deposit_form_url=deposit_form_url) }}
    <br />
    {{ _("Please note that editing the record now before initial publication will reset the review.") }}
</p>
<p>
    {%- if message %}
    {{ _("Reviewer '@%(curator_name)s' accepted the record '%(record_title)s' with the following message:", curator_name=curator_name, record_title=record_title) }}
    {%- else %}
    {{ _("Reviewer '@%(curator_name)s' accepted the record '%(record_title)s'.", curator_name=curator_name, record_title=record_title) }}
    {%- endif %}
</p>
{%- if message %}
<p>
    <em>{{message}}</em>
</p>
{%- endif %}
<p>
    <a href="{{ request_link }}" class="button">{{ _("See the curation request")}}</a>
</p>
<hr />
<p style="font-size:smaller;">
    {{ _('This is an auto-generated message. To manage notifications, visit your <a href="%(account_settings_link)s">account settings</a>.', account_settings_link=account_settings_link) }}
</p>
{%- endblock html_body %}
{#- End of HTML body for emails -#}
{#- Plaintext body for emails -#}
{%- block plain_body -%}
{{ _("Good news: Your dataset was accepted, and you can now publish it yourself via its upload form: %(deposit_form_url)s", deposit_form_url=deposit_form_url) }}
{{ _("Please note that editing the record now before initial publication will reset the review.") }}
{%- if not message %}
{{ _("Reviewer @%(curator_name)s accepted the record '%(record_title)s'.", curator_name=curator_name, record_title=record_title) }}
{%- else %}
{{ _("Reviewer @%(curator_name)s accepted the record '%(record_title)s' with the following message:", curator_name=curator_name, record_title=record_title) }}

{{ _("See the curation request") }}: {{ request_link }}

{{ _("This is an auto-generated message. To manage notifications, visit your account settings")}}
{%- endblock plain_body %}
{#- End of plaintext body -#}
{#- Markdown body for Slack/Mattermost/chat -#}
{%- block md_body -%}
{{ _("Good news: Your dataset was accepted, and you can now publish it yourself via [its upload form](%(deposit_form_url)s)!", deposit_form_url=deposit_form_url) }}
{{ _("Please note that editing the record now before initial publication will reset the review.") }}
{%- if not message %}
{{ _("Reviewer *@%(curator_name)s* accepted the record *%(record_title)s*", curator_name=curator_name, record_title=record_title) }}
{%- else %}
{{ _("Reviewer *@%(curator_name)s* accepted the record *%(record_title)s* with the following message:", curator_name=curator_name, record_title=record_title) }}

> {{message}}
{%- endif %}
[{{ _("See the curation request") }}]({{ request_link }})

{{ _("This is an auto-generated message. To manage notifications, visit your account settings")}}
{%- endblock md_body %}
{#- End of Markdown body -#}