Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{%- 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) %}
{%- block subject -%}
{{ _("✅ Curation request accepted for '{record_title}'").format(record_title=record_title) }}
{%- endblock subject -%}
{%- block html_body -%}
<table style="font-family:'Lato',Helvetica,Arial,sans-serif;border-spacing:15px">
<tr>
<td>
{{ _('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) }}
</td>
</tr>
<tr>
<td>{{ _("The metadata curator '@%(curator_name)s' accepted the record '%(record_title)s'", curator_name=curator_name, record_title=record_title) }}
{% if message %}
{{ _(" with the following message:")}}
{% endif %}
</td>
</tr>
<tr>
{% if message %}
<td><em>{{message}}</em></td>
{% endif %}
</tr>
<tr>
<td><a href="{{ request_link }}" class="button">{{ _("Check out the curation request")}}</a></td>
</tr>
<tr>
<td><strong>_</strong></td>
</tr>
<tr>
<td style="font-size:smaller">{{ _("This is an auto-generated message. To manage notifications, visit your")}} <a href="{{account_settings_link}}">{{ _("account settings")}}</a>.</td>
</tr>
</table>
{%- endblock html_body %}
{%- 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) }}
{{ _("The metadata curator @%(curator_name) accepted the record '%(record_title)s'", curator_name=curator_name, record_title=record_title) }}
{% if message %}
{{ _("with the following message:")}}
{{message}}
{% endif %}
[{{ _("Check out the curation request") }}]({{ request_link }})
{{ _("This is an auto-generated message. To manage notifications, visit your account settings")}}
{%- endblock plain_body %}
{# Markdown 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) }}
{{ _("The metadata curator *@%(curator_name)s* accepted the record *%(record_title)s*", curator_name=curator_name, record_title=record_title) }}
{% if message %}
{{ _("with the following message:")}}
{{message}}
{% endif %}
[{{ _("Check out the curation request") }}]({{ request_link }})
{{ _("This is an auto-generated message. To manage notifications, visit your account settings")}}
{%- endblock md_body %}