-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
notifications: add submission accept action notification
actions: send notification on submission accept action
- Loading branch information
Showing
9 changed files
with
518 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
42 changes: 42 additions & 0 deletions
42
...rdm_records/templates/semantic-ui/invenio_notifications/community-submission.accept.jinja
This file contains 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,42 @@ | ||
{% set submission_request = notification.context.request %} | ||
{% set community = submission_request.receiver %} | ||
{% set creator = submission_request.created_by %} | ||
{% set record = submission_request.topic %} | ||
{% set request_id = submission_request.id %} | ||
{% set executing_user = notification.context.executing_user %} | ||
|
||
{% set community_title = community.metadata.title %} | ||
{% set record_title = record.metadata.title %} | ||
{% set curator_name = executing_user.username %} | ||
|
||
{# 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 | ||
) | ||
%} | ||
|
||
{%- block subject -%} | ||
{{ _("The submission for your record '{record_title}' has been accepted").format(record_title=record_title) }} | ||
{%- endblock subject -%} | ||
|
||
{%- block html_body -%} | ||
<p> | ||
{{ _("Community curator '{curator_name}' accepted the record '{record_title}' in the community '{community_title}'.").format(record_title=record_title, community_title=community_title, curator_name=curator_name) }} | ||
</p> | ||
|
||
<a href="{{ request_link }}" class="button"> {{ _("Check out the submission request") }}</a> | ||
{%- endblock html_body %} | ||
|
||
{%- block plain_body -%} | ||
{{ _("Community curator '{curator_name}' accepted the record '{record_title}' in the community '{community_title}'.").format(record_title=record_title, community_title=community_title, curator_name=curator_name) }} | ||
|
||
{{ _("Check out the submission request: {request_link}").format(request_link=request_link) }} | ||
|
||
{%- endblock plain_body %} | ||
|
||
{# Markdown for Slack/Mattermost/chat #} | ||
{%- block md_body -%} | ||
{{ _("Community curator *{curator_name}* accepted the record *{record_title}* in the community *{community_title}*.").format(record_title=record_title, community_title=community_title, curator_name=curator_name) }} | ||
|
||
[{{_("Check out the submission request")}}]({{request_link}}) | ||
{%- endblock md_body %} |
41 changes: 41 additions & 0 deletions
41
...rdm_records/templates/semantic-ui/invenio_notifications/community-submission.cancel.jinja
This file contains 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,41 @@ | ||
{% set submission_request = notification.context.request %} | ||
{% set community = submission_request.receiver %} | ||
{% set creator = submission_request.created_by %} | ||
{% set record = submission_request.topic %} | ||
{% set request_id = submission_request.id %} | ||
{% set executing_user = notification.context.executing_user %} | ||
|
||
{% set community_title = community.metadata.title %} | ||
{% set record_title = record.metadata.title %} | ||
{% set cancel_name = executing_user.username %} | ||
|
||
{# 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 | ||
) | ||
%} | ||
|
||
{%- block subject -%} | ||
{{ _("Record submission for your community '{community_title}' cancelled by '{cancel_name}'").format(community_title=community_title, cancel_name=cancel_name) }} | ||
{%- endblock subject -%} | ||
|
||
{%- block html_body -%} | ||
<p> | ||
{{ _("The record submission for the record '{record_title}' for your community '{community_title}' was cancelled by '{cancel_name}'.").format(record_title=record_title, community_title=community_title, cancel_name=cancel_name) }} | ||
</p> | ||
|
||
<a href="{{ request_link }}" class="button"> {{ _("Check out the submission request") }}</a> | ||
{%- endblock html_body -%} | ||
|
||
{%- block plain_body -%} | ||
{{ _("The record submission for the record '{record_title}' for your community '{community_title}' was cancelled by '{cancel_name}'.").format(record_title=record_title, community_title=community_title, cancel_name=cancel_name) }} | ||
|
||
{{ _("Check out the submission request: {request_link}").format(request_link=request_link) }} | ||
{%- endblock plain_body -%} | ||
|
||
{# Markdown for Slack/Mattermost/chat #} | ||
{%- block md_body -%} | ||
{{ _("The record submission for the record '{record_title}' for your community '{community_title}' was cancelled by '{cancel_name}'.").format(record_title=record_title, community_title=community_title, cancel_name=cancel_name) }} | ||
|
||
[{{ _("Check out the submission request") }}]({{ request_link }}) | ||
{%- endblock md_body -%} |
42 changes: 42 additions & 0 deletions
42
...dm_records/templates/semantic-ui/invenio_notifications/community-submission.decline.jinja
This file contains 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,42 @@ | ||
{% set submission_request = notification.context.request %} | ||
{% set community = submission_request.receiver %} | ||
{% set creator = submission_request.created_by %} | ||
{% set record = submission_request.topic %} | ||
{% set request_id = submission_request.id %} | ||
{% set executing_user = notification.context.executing_user %} | ||
|
||
{% set community_title = community.metadata.title %} | ||
{% set record_title = record.metadata.title %} | ||
{% set curator_name = executing_user.username %} | ||
|
||
{# 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 | ||
) | ||
%} | ||
|
||
{%- block subject -%} | ||
{{ _("The submission for your record '{record_title}' has been declined").format(record_title=record_title) }} | ||
{%- endblock subject -%} | ||
|
||
{%- block html_body -%} | ||
<p> | ||
{{ _("Community curator '{curator_name}' declined the record '{record_title}' in the community '{community_title}'.").format(record_title=record_title, community_title=community_title, curator_name=curator_name) }} | ||
</p> | ||
|
||
<a href="{{ request_link }}" class="button"> {{ _("Check out the submission request") }}</a> | ||
{%- endblock html_body %} | ||
|
||
{%- block plain_body -%} | ||
{{ _("Community curator '{curator_name}' declined the record '{record_title}' in the community '{community_title}'.").format(record_title=record_title, community_title=community_title, curator_name=curator_name) }} | ||
|
||
{{ _("Check out the submission request: {request_link}").format(request_link=request_link) }} | ||
|
||
{%- endblock plain_body %} | ||
|
||
{# Markdown for Slack/Mattermost/chat #} | ||
{%- block md_body -%} | ||
{{ _("Community curator *{curator_name}* declined the record *{record_title}* in the community *{community_title}*.").format(record_title=record_title, community_title=community_title, curator_name=curator_name) }} | ||
|
||
[{{_("Check out the submission request")}}]({{request_link}}) | ||
{%- endblock md_body %} |
40 changes: 40 additions & 0 deletions
40
...rdm_records/templates/semantic-ui/invenio_notifications/community-submission.expire.jinja
This file contains 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,40 @@ | ||
{% set submission_request = notification.context.request %} | ||
{% set community = submission_request.receiver %} | ||
{% set creator = submission_request.created_by %} | ||
{% set record = submission_request.topic %} | ||
{% set request_id = submission_request.id %} | ||
|
||
{% set community_title = community.metadata.title %} | ||
{% set record_title = record.metadata.title %} | ||
|
||
{# 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 | ||
) | ||
%} | ||
|
||
{%- block subject -%} | ||
{{ _("The submission for your record '{record_title}' has been expired").format(record_title=record_title) }} | ||
{%- endblock subject -%} | ||
|
||
{%- block html_body -%} | ||
<p> | ||
{{ _("The record submission for the record '{record_title}' for the community '{community_title}' has expired'.").format(record_title=record_title, community_title=community_title) }} | ||
</p> | ||
|
||
<a href="{{ request_link }}" class="button"> {{ _("Check out the submission request") }}</a> | ||
{%- endblock html_body %} | ||
|
||
{%- block plain_body -%} | ||
{{ _("The record submission for the record '{record_title}' for the community '{community_title}' has expired'.").format(record_title=record_title, community_title=community_title) }} | ||
|
||
{{ _("Check out the submission request: {request_link}").format(request_link=request_link) }} | ||
|
||
{%- endblock plain_body %} | ||
|
||
{# Markdown for Slack/Mattermost/chat #} | ||
{%- block md_body -%} | ||
{{ _("The record submission for the record '{record_title}' for the community '{community_title}' has expired'.").format(record_title=record_title, community_title=community_title) }} | ||
|
||
[{{_("Check out the submission request")}}]({{request_link}}) | ||
{%- endblock md_body %} |
Oops, something went wrong.