Skip to content

Notifications: Add an option to remove icons/emojis from Mail templates #2240

@karkraeg

Description

@karkraeg

Is your feature request related to a problem? Please describe.

Hi, our institution thinks it would be more "professional" if the mails InvenioRDM sends would not contain icons like 📥 (https://github.com/inveniosoftware/invenio-rdm-records/blob/master/invenio_rdm_records/templates/semantic-ui/invenio_notifications/community-submission.submit.jinja#L19C14-L19C16) or ✅ and so on.

I would propose to introduce a new config var to be able to disable the emojis in the mail templates.

Describe the solution you'd like

  • introduce new config var for use in invenio.cfg: NOTIFICATIONS_SHOW_EMOJIS = False
  • Add in all mail template: {% set show_emojis = config.get('NOTIFICATIONS_SHOW_EMOJIS', True) %}
  • use something like:
{%- block subject -%}
+      {%- set emoji = "✅ " if show_emojis else "" -%}
-       {{ _("✅ Community inclusion accepted for 
+       {{ emoji }}{{ _("Community inclusion accepted for '{record_title}'").format(record_title=record_title) }}
{%- endblock subject -%}

My question is if this would be of interest and if I should open a PR or if you wnat to keep the emojis by all costs.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions