From e7317b7482eea7087c08eefc4f6be424657a2316 Mon Sep 17 00:00:00 2001 From: devketanpro Date: Tue, 27 Aug 2024 18:30:50 +0530 Subject: [PATCH] fix real-time email template for the Calendar section [CPCN-632] --- server/theme/email_agenda.fr_ca.html | 41 ++++++++------- server/theme/email_agenda.fr_ca.txt | 76 ++++++++++++++++---------- server/theme/email_agenda.html | 74 +++++++++++++------------- server/theme/email_agenda.txt | 79 ++++++++++++++++++---------- 4 files changed, 159 insertions(+), 111 deletions(-) diff --git a/server/theme/email_agenda.fr_ca.html b/server/theme/email_agenda.fr_ca.html index e8d2be0..163cfa0 100644 --- a/server/theme/email_agenda.fr_ca.html +++ b/server/theme/email_agenda.fr_ca.html @@ -1,19 +1,22 @@

{{ get_highlighted_field(item, ["headline", "name"]) | safe }}

-Voir cet élément dans votre compte: {{ url_for_agenda(item) }}
-{% if item.event %}

Quand: {{ dateString }} {{get_event_state(item)}}

{% endif %} +Voir cet élément dans votre compte : {{ url_for_agenda(item) }}
+ +{% if item.event %} +

Quand : {{ dateString }} {{get_event_state(item)}}

+{% endif %} {% if location and location != '' %} -

Où: {{ location }}

+

Où : {{ location }}

{% endif %} {% if map and map != '' %}
+ src={{ map | safe }}> {% endif %} {% if contacts | length is gt 0 %} -

Contact: +

Contact : {% for contact in contacts %}

{{ contact.name or contact.organisation }} {{ contact.phone }} @@ -24,7 +27,7 @@

{{ get_highlighted_field(item, ["headline", "name"]) | safe }}

{% endif %} {% if links | length is gt 1 %} -

Web: +

Web : {% for link in links %}

{{ link }}
{% endfor %} @@ -32,26 +35,26 @@

{{ get_highlighted_field(item, ["headline", "name"]) | safe }}

{% endif %} {% if item.definition_long or item.definition_short %} - Description de l’événement: + Description de l’événement :

{{ get_highlighted_field(item, ["definition_long", "definition_short"]) | safe }}

{% endif %} -{% for planning_item in item.get('planning_items', []) or [] %} +{% for planning_item in item.get('planning_items', []) or [] %}
-

Élément de couverture:

+

Élément de couverture :

{% if (planning_item.get('description_text') or planning_item.get('name') or '') != (item.definition_long or item.definition_short) %}

- Description de l’élément de planification: {{ 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: + Note de la rédaction : {{ planning_item.get('ednote') }}
{% endif %} @@ -59,19 +62,19 @@

Élément de couverture:

{% if planning_item.get('coverages', []) %}

-

Couverture:

+

Couverture :

{% for cov in get_planning_coverages(item, planning_item._id) %}
-

Type de couverture: {{get_coverage_content_type(cov,recipient_language)}}

-

Statut de couverture: {{get_coverage_status(cov)}}

-

Date et heure d’échéance de la couverture: {{get_coverage_date(cov)}}

-

Affecté à: +

Type de couverture : {{get_coverage_content_type(cov,recipient_language)}}

+

Statut de couverture : {{get_coverage_status(cov)}}

+

Date et heure d’échéance de la couverture : {{get_coverage_date(cov)}}

+

Affecté à : {% if cov.get('assigned_desk_name') %}{{cov['assigned_desk_name']}}{% endif %} - {% if cov.get('assigned_desk_email') %}{{cov['assigned_desk_email']}}{% endif %} + {% if cov.get('assigned_desk_email') %}{{cov['assigned_desk_email']}}{% endif %} {% if cov.get('assigned_user_name') %}{{cov['assigned_user_name']}}{% endif %} - {% if cov.get('assigned_user_email') %}{{cov['assigned_user_email']}}{% endif %} + {% if cov.get('assigned_user_email') %}{{cov['assigned_user_email']}}{% endif %}

{% endfor %} @@ -79,4 +82,4 @@

Élément de couverture:

{% endif %}
{% endfor %} -
Sujet enregistré: {{ topic_name }}
\ No newline at end of file +
Sujet enregistré : {{ topic_name }}
\ No newline at end of file diff --git a/server/theme/email_agenda.fr_ca.txt b/server/theme/email_agenda.fr_ca.txt index 47c3c46..794d7e1 100644 --- a/server/theme/email_agenda.fr_ca.txt +++ b/server/theme/email_agenda.fr_ca.txt @@ -1,32 +1,54 @@ {{ item.headline or item.name }} -Voir cet élément dans votre compte: {{ url_for_agenda(item) }} -{% if item.event %}Quand: {{ dateString }} {{get_event_state(item)}}{% endif %} -{% if location and location != '' %}Où: {{ location }} -{% endif %}{% if contacts | length is gt 0 %}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 %} +Voir cet élément dans votre compte : {{ url_for_agenda(item) }} +{% if item.event %} + Quand : {{ dateString }} {{get_event_state(item)}} {% endif %} -{% if item.definition_long or item.definition_short %}Description de l’événement: {{ item.definition_long or item.definition_short }} + +{% if location and location != '' %} + Où : {{ location }} {% 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) %} -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) %} -Type de couverture: {{get_coverage_content_type(cov,recipient_language)}} -Statut de couverture: {{get_coverage_status(cov)}} -Date et heure d’échéance de la couverture: {{get_coverage_date(cov)}} -Affecté à: -{% if cov.get('assigned_desk_name')%}{{cov['assigned_desk_name']}}{% endif %} -{% if cov.get('assigned_desk_email') %}{{cov['assigned_desk_email']}}{% endif %} -{% if cov.get('assigned_user_name') %}{{cov['assigned_user_name']}}{% endif %} -{% if cov.get('assigned_user_email') %}{{cov['assigned_user_email']}}{% endif %} -{% endfor %} + +{% if contacts | length is gt 0 %} + 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 %} + 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) %} + 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) %} + Type de couverture : {{ get_coverage_content_type(cov, recipient_language) }} + Statut de couverture : {{ get_coverage_status(cov) }} + Date et heure d’échéance de la couverture : {{ get_coverage_date(cov) }} + Affecté à : + {% if cov.get('assigned_desk_name') %}{{ cov['assigned_desk_name'] }}{% endif %} + {% if cov.get('assigned_desk_email') %}{{ cov['assigned_desk_email'] }}{% endif %} + {% if cov.get('assigned_user_name') %}{{ cov['assigned_user_name'] }}{% endif %} + {% if cov.get('assigned_user_email') %}{{ cov['assigned_user_email'] }}{% endif %} + {% endfor %} + {% endif %} {% endfor %} -Sujet enregistré: {{ topic_name }} \ No newline at end of file + +Sujet enregistré : {{ topic_name }} diff --git a/server/theme/email_agenda.html b/server/theme/email_agenda.html index cf78429..06a18c0 100644 --- a/server/theme/email_agenda.html +++ b/server/theme/email_agenda.html @@ -1,29 +1,36 @@

{{ get_highlighted_field(item, ["headline", "name"]) | safe }}

-View this item in your account: {{ url_for_agenda(item) }}
-{% if item.event %}

When:{{ dateString }} {{get_event_state(item)}}

{% endif %} + +View this item in your account : {{ url_for_agenda(item) }}
+ +{% if item.event %} +

When : {{ dateString }} {{ get_event_state(item) }}

+{% endif %} {% if location and location != '' %} -

Where: {{ location }}

+

Where : {{ location }}

{% endif %} {% if map and map != '' %} -
+
+ +
{% endif %} {% if contacts | length is gt 0 %} -

Contact: +

Contact : {% for contact in contacts %} -

{{ contact.name or contact.organisation }} - {{ contact.phone }} - {{ contact.mobile }} - {{ contact.email }}
+
+ {{ contact.name or contact.organisation }}
+ {{ contact.phone }}
+ {{ contact.mobile }}
+ {{ contact.email }} +
{% endfor %} -

+


{% endif %} {% if links | length is gt 1 %} -

Web: +

Web : {% for link in links %}

{{ link }}
{% endfor %} @@ -31,47 +38,40 @@

{{ get_highlighted_field(item, ["headline", "name"]) | safe }}

{% endif %} {% if item.definition_long or item.definition_short %} - Event description: -

- {{ get_highlighted_field(item, ["definition_long", "definition_short"]) | safe }} -

+ Event description : +

{{ get_highlighted_field(item, ["definition_long", "definition_short"]) | safe }}

{% endif %} -{% for planning_item in item.get('planning_items', []) or [] %} +{% for planning_item in item.get('planning_items', []) or [] %}
-
-

Planning item:

- {% if (planning_item.get('description_text') or planning_item.get('name') or '') != (item.definition_long or item.definition_short) %} -

- Planning item description: {{ planning_item.get('description_text') or planning_item.get('name') or '' }} -

- {% endif %} -
+

Planning item :

+ {% if (planning_item.get('description_text') or planning_item.get('name') or '') != (item.definition_long or item.definition_short) %} +

Planning item description : {{ planning_item.get('description_text') or planning_item.get('name') or '' }}

+ {% endif %} {% if planning_item.get('ednote') %}
- Editorial Note: - {{ planning_item.get('ednote') }} + Editorial Note : {{ planning_item.get('ednote') }}
{% endif %} {% if planning_item.get('coverages', []) %}

-

Coverage:

+

Coverage :

{% for cov in get_planning_coverages(item, planning_item._id) %}
-

Type of coverage: {{get_coverage_content_type(cov,recipient_language)}}

-

Coverage status: {{get_coverage_status(cov)}}

-

Coverage due date & time: {{get_coverage_date(cov)}}

+

Type of coverage : {{ get_coverage_content_type(cov, recipient_language) }}

+

Coverage status : {{ get_coverage_status(cov) }}

+

Coverage due date & time : {{ get_coverage_date(cov) }}

{% if cov.get('assigned_desk_name') or cov.get('assigned_desk_email') or cov.get('assigned_user_name') or cov.get('assigned_user_email') %} -

Assigned to: - {% if cov.get('assigned_desk_name') %}{{cov['assigned_desk_name']}}{% endif %} - {% if cov.get('assigned_desk_email') %}{{cov['assigned_desk_email']}}{% endif %} - {% if cov.get('assigned_user_name') %}{{cov['assigned_user_name']}}{% endif %} - {% if cov.get('assigned_user_email') %}{{cov['assigned_user_email']}}{% endif %} +

Assigned to : + {% if cov.get('assigned_desk_name') %}{{ cov['assigned_desk_name'] }}{% endif %} + {% if cov.get('assigned_desk_email') %}{{ cov['assigned_desk_email'] }}{% endif %} + {% if cov.get('assigned_user_name') %}{{ cov['assigned_user_name'] }}{% endif %} + {% if cov.get('assigned_user_email') %}{{ cov['assigned_user_email'] }}{% endif %}

{% endif %}
@@ -81,4 +81,4 @@

Planning item:

{% endfor %} -
Saved topic: {{ topic_name }}
\ No newline at end of file +
Saved topic : {{ topic_name }}
diff --git a/server/theme/email_agenda.txt b/server/theme/email_agenda.txt index 470a55e..9330c72 100644 --- a/server/theme/email_agenda.txt +++ b/server/theme/email_agenda.txt @@ -1,33 +1,56 @@ {{ item.headline or item.name }} -View this item in your account: {{ url_for_agenda(item) }} -{% if item.event %}When: {{ dateString }} {{get_event_state(item)}}{% endif %} -{% if location and location != '' %}Where: {{ location }}{% endif %} -{% if contacts | length is gt 0 %}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 %} + +View this item in your account : {{ url_for_agenda(item) }} + +{% if item.event %} + When : {{ dateString }} {{ get_event_state(item) }} {% endif %} -{% if item.definition_long or item.definition_short %}Event description: {{ item.definition_long or item.definition_short }} + +{% if location and location != '' %} + Where : {{ location }} {% endif %} -{% for planning_item in item.get('planning_items', []) or [] %} -Planning Item: -{%- if (planning_item.get('description_text') or planning_item.get('name') or '') != (item.definition_long or item.definition_short) %} -Planning item description: {{ planning_item.get('description_text') or planning_item.get('name') or '' }} -{% endif -%} -{% if planning_item.get('ednote') %}Editorial Note: {{ planning_item.get('ednote') }} -{% endif -%} -{% if planning_item.get('coverages', []) | length is gt 0 %} -Coverages: -{% for cov in get_planning_coverages(item, planning_item._id) %} -Type of coverage:{{get_coverage_content_type(cov,recipient_language)}} -Coverage status: {{get_coverage_status(cov)}} -Coverage due date & time: {{get_coverage_date(cov)}} -Assigned to: -{% if cov.get('assigned_desk_name') %}{{cov['assigned_desk_name']}}{% endif %} -{% if cov.get('assigned_desk_email') %}{{cov['assigned_desk_email']}}{% endif %} -{% if cov.get('assigned_user_name') %}{{cov['assigned_user_name']}}{% endif %} -{% if cov.get('assigned_user_email') %}{{cov['assigned_user_email']}}{% endif %} -{% endfor %} + +{% if contacts | length is gt 0 %} + 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 %} + Event description : {{ item.definition_long or item.definition_short }} {% endif %} + +{% for planning_item in item.get('planning_items', []) or [] %} + Planning Item : + {%- if (planning_item.get('description_text') or planning_item.get('name') or '') != (item.definition_long or item.definition_short) %} + Planning item description : {{ planning_item.get('description_text') or planning_item.get('name') or '' }} + {% endif -%} + + {% if planning_item.get('ednote') %} + Editorial Note : {{ planning_item.get('ednote') }} + {% endif %} + + {% if planning_item.get('coverages', []) | length is gt 0 %} + Coverages : + {% for cov in get_planning_coverages(item, planning_item._id) %} + Type of coverage : {{ get_coverage_content_type(cov, recipient_language) }} + Coverage status : {{ get_coverage_status(cov) }} + Coverage due date & time : {{ get_coverage_date(cov) }} + Assigned to : + {% if cov.get('assigned_desk_name') %}{{ cov['assigned_desk_name'] }}{% endif %} + {% if cov.get('assigned_desk_email') %}{{ cov['assigned_desk_email'] }}{% endif %} + {% if cov.get('assigned_user_name') %}{{ cov['assigned_user_name'] }}{% endif %} + {% if cov.get('assigned_user_email') %}{{ cov['assigned_user_email'] }}{% endif %} + {% endfor %} + {% endif %} {% endfor %} -Saved topic: {{ topic_name }} \ No newline at end of file + +Saved topic : {{ topic_name }}