Skip to content

Commit

Permalink
Scheduled notification email template - FR version
Browse files Browse the repository at this point in the history
  • Loading branch information
dzonidoo committed Oct 9, 2023
1 parent 77aed46 commit 69d44c4
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{% extends "email_layout.html" %}
{% block htmlhead %}
<style>
{% include "email_stylesheet.css" %}
</style>
{% endblock %}
{% block name %}{% endblock %}
{% block content %}

<p>{{ date | notification_datetime }}</p>

<table>
<thead>
<tr>
<th>Votre sujet enregistré</th>
<th>Nombre</th>
</tr>
</thead>
<tbody>
{% for section, matches in topic_match_table.items() %}
{% for name, count in matches %}
<tr>
<td>Nouveaux éléments de {{ config.AGENDA_SECTION if section == "agenda" else config.WIRE_SECTION }} sur "{{ name }}"</td>
<td>{{ count }}</td>
</tr>
{% endfor %}
{% endfor %}
</tbody>
</table>

{% for section, entries in entries.items() %}
{% for entry in entries %}

<h2>Élément de {{ config.AGENDA_SECTION if section == "agenda" else config.WIRE_SECTION }} le plus récent sur "{{ entry.topic.label }}"</h2>
{% if section == "wire" %}

<p><strong>{{ get_highlighted_field(entry.item, ["headline"]) | safe }}</strong></p>
<p>Titre de rappel: {{ entry.item.slugline }} | Source: {{ entry.item.source}}</p>
<p>Publié le: {{ entry.item.versioncreated | notification_datetime }} | {{ entry.item.body_html | word_count }} words{% if entry.item.service %} mots | Catégorie: {{ entry.item | category_names }}{% endif %}</p>
{{ short_highlighted_text(get_highlighted_field(entry.item, ["body_html"])) | safe }}
<p>Consulter cet élément dans votre compte: <a href="{{ url_for_wire(entry.item, True, section) }}">Link</a></p>
<p>Consulter tous les éléments: <a href="{{ url_for('wire.wire', _external=True) }}?topic={{ entry.topic._id }}">Link</a></p>

{% elif section == "agenda" %}

<p><strong>{{ get_highlighted_field(entry.item, ["headline", "name"]) | safe }}</strong></p>
<p>Date et heure de l’événement: {{ entry.item | agenda_dates_string }}{% if entry.item.location %} | Endroit: {{ entry.item | location_string }}{% endif %}</p>
<p>Publié le: {{ entry.item.versioncreated | notification_datetime }}{% if entry.item.service %} | Catégorie: {{ entry.item | category_names }}{% endif %}</p>

{{ short_highlighted_text(get_highlighted_field(entry.item, ["definition_long", "description_text", "definition_short"])) | safe }}

<p>Consulter cet élément dans votre compte: <a href="{{ url_for_wire(entry.item, True, section) }}">Link</a></p>
<p>Consulter tous les éléments: <a href="{{ url_for('agenda.index', _external=True) }}?topic={{ entry.topic._id }}">Link</a></p>

{% endif %}

{% endfor %}
{% endfor %}
{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{% extends "email_layout.txt" %}
{% block name %}{% endblock %}
{% block content %}
{{ date | notification_datetime }}

Votre sujet enregistré\tNombre
{% for section, matches in topic_match_table.items() %}
{% for name, count in matches %}
Nouveaux éléments de {{ config.AGENDA_SECTION if section == "agenda" else config.WIRE_SECTION }} sur "{{ name }}"\t{{ count }}
{% endfor %}
{% endfor %}

{% for section, topic_entries in entries.items() %}
{% for entry in topic_entries %}

Élément de {{ section }} le plus récent sur {{ entry.topic.label }}
{% if section == "wire" %}
{{ entry.item.headline }}

Titre de rappel: {{ entry.item.slugline }} | Source: {{ entry.item.source}}
Publié le: {{ entry.item.versioncreated | notification_datetime }} | {{ entry.item.body_html | word_count }} words{% if entry.item.service %} mots | Catégorie: {{ entry.item | category_names }}{% endif %}
{{ short_highlighted_text(get_highlighted_field(entry.item, ["body_html"]), output_html=False) }}
Consulter cet élément dans votre compte: {{ url_for_wire(entry.item, True, section) }}
Consulter tous les éléments: {{ url_for('wire.wire', _external=True) }}?topic={{ entry.topic._id }}

{% elif section == "agenda" %}

{{ entry.item.headline or entry.item.name }}
Date et heure de l’événement: {{ entry.item | agenda_dates_string }}{% if entry.item.location %} | Endroit: {{ entry.item | location_string }}{% endif %}
Publié le: {{ entry.item.versioncreated | notification_datetime }}{% if entry.item.service %} | Catégorie: {{ entry.item | category_names }}{% endif %}

{{ short_highlighted_text(get_highlighted_field(entry.item, ["definition_long", "description_text", "definition_short"]), output_html=False) }}

Consulter cet élément dans votre compte: {{ url_for_wire(entry.item, True, section) }}
Consulter tous les éléments: {{ url_for('agenda.index', _external=True) }}?topic={{ entry.topic._id }}

{% endif %}

{% endfor %}
{% endfor %}
{% endblock %}

0 comments on commit 69d44c4

Please sign in to comment.