From 53cb7cada8687da9a34be27296275fce971a6b5e Mon Sep 17 00:00:00 2001 From: Jens Kleineheismann Date: Wed, 28 Aug 2019 15:24:52 +0200 Subject: [PATCH] UPD: dav_events: improved event to publish mails. --- .../emails/event_to_publish_facebook.txt | 57 +++++++++++++++++-- .../emails/event_to_publish_web.txt | 4 +- 2 files changed, 55 insertions(+), 6 deletions(-) diff --git a/dav_events/templates/dav_events/emails/event_to_publish_facebook.txt b/dav_events/templates/dav_events/emails/event_to_publish_facebook.txt index dccaa94..432a901 100644 --- a/dav_events/templates/dav_events/emails/event_to_publish_facebook.txt +++ b/dav_events/templates/dav_events/emails/event_to_publish_facebook.txt @@ -11,10 +11,10 @@ Der folgende Link führt zur Veranstaltung: Veröffentlichung: ({% if planned_publication_date %}{{ planned_publication_date|date:'l, d. F Y' }}{% else %}sofort{% endif %}) ================= -{% if planned_publication_date %}Veröffentlichung starten: {{ planned_publication_date|date:'d.m.Y' }} 00:00:00 -{% endif %}Veröffentlichung beenden: {{ day_after|date:'d.m.Y' }} 00:00:00 +Veröffentlichung starten: {% if planned_publication_date %}{{ planned_publication_date|date:'d.m.Y' }} 00:00:00{% else %}--{% endif %} +Veröffentlichung beenden: {{ day_after|date:'d.m.Y' }} 00:00:00 Erstellungsdatum: {{ first_day|date:'d.m.Y' }} 00:00:00 -Titel: {{ number }} - {{ title }} +Titel: {{ number }} {{ title }} {% if internal_note %} Bearbeitungshinweis: ==================== @@ -22,4 +22,53 @@ Bearbeitungshinweis: {% endif %} Ausschreibung: ============== -{{ event.render_as_text }} \ No newline at end of file +{{ number }} {{ title }} + +{{ normalized_date }} +{% if alt_normalized_date %}({% trans 'Ersatztermin' %}: {{ alt_normalized_date }}) +{% endif %} +{{ description }} +{% if mode == 'training' %} +{% trans 'Kursinhalte' %}: +{% if course_topic_2 %} + - {{ course_topic_1 }} + - {{ course_topic_2 }} +{% if course_topic_3 %} - {{ course_topic_3 }} +{% endif %}{% if course_topic_4 %} - {{ course_topic_4 }} +{% endif %}{% if course_topic_5 %} - {{ course_topic_5 }} +{% endif %}{% if course_topic_6 %} - {{ course_topic_6 }} +{% endif %}{% else %} +{{ course_topic_1 }} +{% endif %} +{% trans 'Kursziele' %}: +{% if course_goal_2 %} + - {{ course_goal_1 }} + - {{ course_goal_2 }} +{% if course_goal_3 %} - {{ course_goal_3 }} +{% endif %}{% if course_goal_4 %} - {{ course_goal_4 }} +{% endif %}{% if course_goal_5 %} - {{ course_goal_5 }} +{% endif %}{% if course_goal_6 %} - {{ course_goal_6 }} +{% endif %}{% else %} +{{ course_goal_1 }} +{% endif %} +{% endif %} +{% if requirements %}{% trans 'Anforderungen' %}: {{ requirements }} +{% endif %}{% if equipment %}{% trans 'Ausrüstung' %}: {{ equipment }} +{% endif %}{% if location %}{% trans 'Ort' %}: {{ location }} {% if country and country != 'DE' and country != 'XX' %}({{ country }}){% endif %} +{% endif %}{% if basecamp %}{% trans 'Stützpunkt' %}: {{ basecamp }} +{% endif %}{% if accommodation and accommodation != 'NONE' %}{% trans 'Unterkunft' %}: {% if accommodation == 'OTHER' %}{{ accommodation_other }}{% else %}{{ event.get_accommodation_display }}{% endif %} +{% endif %}{% if meals and meals != 'NONE' %}{% trans 'Verpflegung' %}: {% if meals == 'OTHER' %}{{ meals_other }}{% else %}{{ event.get_meals_display }}{% endif %} +{% endif %}{% if transport and transport != 'NONE' and transport != 'public' %}{% trans 'Hin- / Rückfahrt' %}: {% if transport == 'OTHER' %}{{ transport_other }}{% else %}{{ event.get_transport_display }}{% endif %} +{% endif %}{% if meeting_point and meeting_point != 'NONE' %}{% trans 'Treffpunkt' %}: {% if meeting_time %}{{ meeting_time|time:'G:i'|cut:':00' }} Uhr, {% endif %}{% if meeting_point == 'OTHER' %}{{ meeting_point_other }}{% else %}{{ event.get_meeting_point_display }}{% endif %} +{% endif %}{% if transport == 'public' %}{% if departure_time or departure_ride %}{% trans 'Abfahrt' %}: {% if departure_time %}{{ departure_time|time:'G:i'|cut:':00' }} Uhr{% endif %}{% if departure_time and departure_ride %}, {% endif %}{% if departure_ride %}{{ departure_ride }}{% endif %} +{% endif %}{% endif %}{% if return_departure_time or return_arrival_time %}{% trans 'Rückfahrt' %}: {% if return_arrival_time %}{{ return_arrival_time|time:'G:i'|cut:':00' }} Uhr ({% trans 'Ankunft in' %} Karlsruhe){% elif return_departure_time %}{{ return_departure_time|time:'G:i'|cut:':00' }} Uhr ({% trans 'Abfahrt am Tourenort' %}){% endif %} +{% endif %}{% if pre_meeting_1 %}{% if pre_meeting_2 %}{% trans 'Vortreffen' %} 1: {{ pre_meeting_1|date:'l, d. F Y, G:i'|cut:':00' }} {% trans 'Uhr' %}, DAV {% trans 'Sektionszentrum' %} +{% trans 'Vortreffen' %} 2: {{ pre_meeting_2|date:'l, d. F Y, G:i'|cut:':00' }} {% trans 'Uhr' %}, DAV {% trans 'Sektionszentrum' %}{% else %}{% trans 'Vortreffen' %}: {{ pre_meeting_1|date:'l, d. F Y, G:i'|cut:':00' }} {% trans 'Uhr' %}, DAV {% trans 'Sektionszentrum' %}{% endif %} +{% endif %}{% if min_participants > 0 or max_participants > 0 %}{% trans 'Teilnehmerzahl' %}: {% if min_participants == max_participants %}{{ max_participants }} {% trans 'Teilnehmer' %}{% elif min_participants > 0 and max_participants > 0 %}{{ min_participants }} - {{ max_participants }} {% trans 'Teilnehmer' %}{% elif min_participants > 0 %}min. {{ min_participants }} {% trans 'Teilnehmer' %}{% else %}max. {{ max_participants }} {% trans 'Teilnehmer' %}{% endif %} +{% endif %}{% if charge > 0 or additional_costs %}{% trans 'Kosten' %}: {% if charge > 0 %}{{ charge|floatformat:'-2' }} € {% trans 'Teilnahmegebühr' %}{% endif %}{% if additional_costs %}{% if charge > 0 %} {% trans 'zzgl.' %} {% endif %}{{ additional_costs }}{% endif %} +{% endif %}{% if registration_required and deadline %}{% trans 'Anmeldeschluss' %}: {{ deadline|date:'l, d. F Y' }} +{% endif %}{% if trainer_2_fullname %}{% if mode == 'training' %}{% trans 'Ausbildungsteam' %}:{% else %}{% trans 'Team' %}:{% endif %} {{ trainer_firstname }} {{ trainer_familyname }}, {{ trainer_2_fullname }}{% if trainer_3_fullname %}, {{ trainer_3_fullname }}{% endif %} +{% endif %}{% if trainer_familyname %}{% trans 'Leitung' %}: {{ trainer_firstname }} {{ trainer_familyname }}{% if trainer_email or trainer_phone %} ({% if trainer_email %}{{ trainer_email }}{% endif %}{% if trainer_email and trainer_phone %}, {% endif %}{% if trainer_phone %}{{ trainer_phone }}{% endif %}){% endif %} +{% endif %}{% if registration_required and registration_howto %} +{{ registration_howto }} +{% endif %} \ No newline at end of file diff --git a/dav_events/templates/dav_events/emails/event_to_publish_web.txt b/dav_events/templates/dav_events/emails/event_to_publish_web.txt index cd7baec..bcaa884 100644 --- a/dav_events/templates/dav_events/emails/event_to_publish_web.txt +++ b/dav_events/templates/dav_events/emails/event_to_publish_web.txt @@ -11,8 +11,8 @@ Der folgende Link führt zur Veranstaltung: Veröffentlichung: ({% if planned_publication_date %}{{ planned_publication_date|date:'l, d. F Y' }}{% else %}sofort{% endif %}) ================= -{% if planned_publication_date %}Veröffentlichung starten: {{ planned_publication_date|date:'d.m.Y' }} 00:00:00 -{% endif %}Veröffentlichung beenden: {{ day_after|date:'d.m.Y' }} 00:00:00 +Veröffentlichung starten: {% if planned_publication_date %}{{ planned_publication_date|date:'d.m.Y' }} 00:00:00{% else %}--{% endif %} +Veröffentlichung beenden: {{ day_after|date:'d.m.Y' }} 00:00:00 Erstellungsdatum: {{ first_day|date:'d.m.Y' }} 00:00:00 Titel: {{ number }} - {{ title }} {% if internal_note %}