Skip to content

Commit

Permalink
update email alerts template for agenda items [CPCN-523]
Browse files Browse the repository at this point in the history
  • Loading branch information
devketanpro committed Jan 9, 2024
1 parent 079c879 commit 924137f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 21 deletions.
26 changes: 15 additions & 11 deletions server/theme/email_agenda.fr_ca.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1>{{ get_highlighted_field(item, ["headline", "name"]) | safe }}</h1>
<a href="{{ url_for_agenda(item) }}">{{ url_for_agenda(item) }}</a>
<a href="{{ url_for_agenda(item) }}"><b>Voir cet élément dans votre compte: </b>{{ url_for_agenda(item) }}</a>

{% if item.event %}<p class="h3">{{ dateString }}</p>{% endif %}
{% if item.event %}<p class="h3"><b>Quand: </b>{{ dateString }}</p>{% endif %}

{% if location and location != '' %}
<p class="h3"><b>Où:</b> {{ location }}</p>
Expand Down Expand Up @@ -32,6 +32,7 @@ <h1>{{ get_highlighted_field(item, ["headline", "name"]) | safe }}</h1>
{% endif %}

{% if item.definition_long or item.definition_short %}
<b>Description de l’événement: </b>
<p>
{{ get_highlighted_field(item, ["definition_long", "definition_short"]) | safe }}
</p>
Expand All @@ -43,7 +44,7 @@ <h1>{{ get_highlighted_field(item, ["headline", "name"]) | safe }}</h1>
<h3>Élément de couverture:</h3>
{% if (planning_item.get('description_text') or planning_item.get('name') or '') != (item.definition_long or item.definition_short) %}
<p>
{{ planning_item.get('description_text') or planning_item.get('name') or '' }}
<b>Description de l’élément de planification: </b>{{ planning_item.get('description_text') or planning_item.get('name') or '' }}
</p>
{% endif %}
</div>
Expand All @@ -62,14 +63,17 @@ <h3>Élément de couverture:</h3>
</div>

{% for cov in get_planning_coverages(item, planning_item._id) %}
<div>Couverture {{ get_coverage_content_type(cov, 'fr_ca') }} '{{ cov.slugline or cov.planning.slugline }}' {% include 'coverage_status_text.fr_ca.txt' %}</div>
{% if cov.get('planning', {}).get('ednote') %}
<div><i> Note de la rédaction: {{ cov['planning']['ednote'] }}</i></div>
{% endif %}
{% if is_admin and cov.get('planning', {}).get('internal_note') %}
<div><i>Note interne: {{ cov['planning']['internal_note'] }}</i></div>
{% endif %}
<br><br>
<div>
<p><b>Type de couverture: </b>{{get_coverage_content_type_name(cov,recipient_language)}}</p>
<p><b>Statut de couverture: </b>{{get_coverage_status_text(cov)}}</p>
<p><b>Date et heure d’échéance de la couverture: </b>{{ cov['scheduled'] | notification_datetime }}</p>
<p><b>Affecté à: </b>
{{cov['assigned_desk_name']}}
{{cov['assigned_desk_email']}}
{{cov['assigned_user_name']}}
{{cov['assigned_user_email']}}
</p>
</div>
{% endfor %}
</p>
{% endif %}
Expand Down
18 changes: 8 additions & 10 deletions server/theme/email_agenda.fr_ca.txt
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
{{ item.headline or item.name }}
{{ url_for_agenda(item) }}
{% if item.event %}{{ dateString }}{% endif %}
Voir cet élément dans votre compte: {{ url_for_agenda(item) }}
{% if item.event %}Quand: {{ dateString }}{% endif %}
{% if location and location != '' %}Où: {{ location }}
{% endif %}{% if contacts | length is gt 1 %}Contact: {% for contact in contacts %}{{ contact.name or contact.organisation }} {{ contact.phone }} {{ contact.mobile }} {{ contact.email }}
{% endfor %}
{% endif %}{% if links | length is gt 1 %}Web: {% for link in links %}{{ link }}
{% endfor %}
{% endif %}
{% if item.definition_long or item.definition_short %}{{ item.definition_long or item.definition_short }}
{% if item.definition_long or item.definition_short %}Description de l’événement: {{ item.definition_long or item.definition_short }}
{% endif %}
{% for planning_item in item.get('planning_items', []) or [] %}
Élément de couverture:
{%- if (planning_item.get('description_text') or planning_item.get('name') or '') != (item.definition_long or item.definition_short) %}
{{ planning_item.get('description_text') or planning_item.get('name') or '' }}
Description de l’élément de planification: {{ planning_item.get('description_text') or planning_item.get('name') or '' }}
{% endif -%}
{% if planning_item.get('ednote') %}Note de la rédaction: {{ planning_item.get('ednote') }}{% endif %}
{% if planning_item.get('coverages', []) | length is gt 0 %}
Couverture:
{% for cov in get_planning_coverages(item, planning_item._id) %}
Couverture {{ get_coverage_content_type(cov, 'fr_ca') }} '{{ cov.slugline or cov.planning.slugline }}' {% include 'coverage_status_text.fr_ca.txt' %}
{%- if cov.get('planning', {}).get('ednote') %}
Note de la rédaction: {{ cov['planning']['ednote'] }} {% endif %}
{%- if is_admin and cov.get('planning', {}).get('internal_note') %}
Note interne: {{ cov['planning']['internal_note'] }}
{% endif %}
Type de couverture: {get_coverage_content_type_name(cov,recipient_language)}
Statut de couverture: {get_coverage_status_text(cov)}
Date et heure d’échéance de la couverture: { cov['scheduled'] | notification_datetime }
Affecté à: {{cov['assigned_desk_name']}} {{cov['assigned_desk_email']}} {{cov['assigned_user_name']}} {{cov['assigned_user_email']}}
{% endfor %}
{% endif %}
{% endfor %}

0 comments on commit 924137f

Please sign in to comment.