-
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.
access-requests: send notification on submit action
- Loading branch information
Showing
6 changed files
with
227 additions
and
5 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
36 changes: 36 additions & 0 deletions
36
...rdm_records/templates/semantic-ui/invenio_notifications/guest-access-request.submit.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,36 @@ | ||
{% set access_request = notification.context.request %} | ||
{% set creator_email = access_request.created_by %} | ||
{% set record = access_request.topic %} | ||
|
||
{% set record_title = record.metadata.title %} | ||
{% set request_id = access_request.id %} | ||
{# 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 -%} | ||
{{ _("New access request for '{record_title}'.").format(record_title=record_title) }} | ||
{%- endblock subject -%} | ||
|
||
{%- block html_body -%} | ||
<p> | ||
{{ _("New access request for '{record_title}' was submitted.").format(record_title=record_title) }} | ||
</p> | ||
|
||
<a href="{{ request_link }}" class="button"> {{ _("Check out the access request") }}</a> | ||
{%- endblock html_body -%} | ||
|
||
{%- block plain_body -%} | ||
{{ _("New access request for '{record_title}' was submitted.").format(record_title=record_title) }} | ||
|
||
{{ _("Checkout the access request: {url}").format(url=request_link) }} | ||
{%- endblock plain_body -%} | ||
|
||
{# Markdown for Slack/Mattermost/chat #} | ||
{%- block md_body -%} | ||
{{ _("New access request for *{record_title}* was submitted.").format(record_title=record_title) }} | ||
|
||
[{{ _("Checkout the access request") }}]({{ request_link }}) | ||
{%- endblock md_body -%} |
36 changes: 36 additions & 0 deletions
36
..._rdm_records/templates/semantic-ui/invenio_notifications/user-access-request.submit.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,36 @@ | ||
{% set access_request = notification.context.request %} | ||
{% set creator = access_request.created_by %} | ||
{% set record = access_request.topic %} | ||
|
||
{% set record_title = record.metadata.title %} | ||
{% set request_id = access_request.id %} | ||
{# 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 -%} | ||
{{ _("New access request for '{record_title}'.").format(record_title=record_title) }} | ||
{%- endblock subject -%} | ||
|
||
{%- block html_body -%} | ||
<p> | ||
{{ _("New access request for '{record_title}' was submitted.").format(record_title=record_title) }} | ||
</p> | ||
|
||
<a href="{{ request_link }}" class="button"> {{ _("Check out the access request") }}</a> | ||
{%- endblock html_body -%} | ||
|
||
{%- block plain_body -%} | ||
{{ _("New access request for '{record_title}' was submitted.").format(record_title=record_title) }} | ||
|
||
{{ _("Checkout the access request: {url}").format(url=request_link) }} | ||
{%- endblock plain_body -%} | ||
|
||
{# Markdown for Slack/Mattermost/chat #} | ||
{%- block md_body -%} | ||
{{ _("New access request for *{record_title}* was submitted.").format(record_title=record_title) }} | ||
|
||
[{{ _("Checkout the access request") }}]({{ request_link }}) | ||
{%- endblock md_body -%} |
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