{% extends 'emails/base.html.twig' %} {% block subject %} {%- autoescape false -%} {% if type == constant('App\\DBAL\\Types\\NotificationType::EVENT') %} Reminder: Your {{ type|readable_enum('NotificationType')|lower }} {{ object }} happens {{ format_date_range_label(object.startDate, object.endDate, object.allDay, receiver.dateFormat, receiver.timeFormat) }} {% else %} Reminder: {{ type|readable_enum('NotificationType')|title }} {{ object }} is due {{ format_date_range_label(null, object.endDate, object.allDay, receiver.dateFormat, receiver.timeFormat) }} {% endif %} {%- 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 ~ ' is reminding you about the ' ~ type|readable_enum('NotificationType')|lower ~ ' "' ~ object ~ '"' : 'You\'re being reminded about 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') ] %}