{% extends 'emails/base.html.twig' %} {% block subject %} {%- autoescape false -%} You've been added to the {{ type|readable_enum('NotificationType')|lower }} {{ object }} {%- endautoescape -%} {% endblock %} {% block body_text %} {% autoescape false %} {% if object.body is defined %} {{ object.body|html2text }} {% endif %} {% if type in [ constant('App\\DBAL\\Types\\NotificationType::DOCUMENT'), constant('App\\DBAL\\Types\\NotificationType::EVENT'), constant('App\\DBAL\\Types\\NotificationType::TASK') ] %} Name: {{ object }} {% if object.column|default(null) %} Column: {{ object.column }} {% endif %} {% if object.endDate %} {% if type == constant('App\\DBAL\\Types\\NotificationType::EVENT') %} Scheduled: {{ format_date_range_label(object.startDate, object.endDate, object.allDay, receiver.dateFormat, receiver.timeFormat) }} {% else %} Due: {{ format_date_range_label(null, object.endDate, object.allDay, receiver.dateFormat, receiver.timeFormat) }} {% endif %} {% endif %} Assigned to: {% for user in object.targetUsers %}{{ user }}{% if not loop.last %}, {% endif %}{% else %}Not assigned{% endfor %} {% if object.priority %} Priority: {{ object.priority|readable_enum('PriorityType') }} {% endif %} {% if object.meetingUrl|default(null) %} Conference link: {{ object.meetingUrl }} {% endif %} {% if object.location|default(null) %} Location: {{ object.location }} {% endif %} {% endif %} {{ objectUrl }} Thanks, Your friends at Ledger {% endautoescape %} {% endblock %} {% block body_html_content %} {% import 'emails/macros.html.twig' as EUI %} {{ EUI.displayAvatarText( app.user|default(appScheme ~ '://' ~ appHost ~ asset('images/ledger-icon.png')), app.user ? app.user ~ ' added you to the ' ~ type|readable_enum('NotificationType')|lower ~ ' "' ~ object ~ '"' : 'You\'ve been added you to the ' ~ type|readable_enum('NotificationType')|lower ~ ' "' ~ object ~ '"' ) }} {% if object.body is defined %}

{{ object.body|render_html|raw }}

{% endif %} {% if type in [ constant('App\\DBAL\\Types\\NotificationType::DOCUMENT'), constant('App\\DBAL\\Types\\NotificationType::EVENT'), constant('App\\DBAL\\Types\\NotificationType::TASK') ] %} {% endif %}
{% for comment in object.initializedComments|default([]) %} {{ EUI.displayComment(comment) }} {% endfor %} {% if object.initializedFiles|default([]) is not empty %} {{ EUI.displayCard( null, object.creator, object.creator|default({name: 'Unknown User'}).name ~ ' added files', EUI.displayFiles(object.initializedFiles), object.createdAt|date(receiver.timeFormat|default('h:i A')) ) }} {% endif %}

View {{ type|readable_enum('NotificationType') }}

{% endblock %}