UPD: improved publish event mail.
This commit is contained in:
@@ -581,7 +581,7 @@ class TrainerForm(EventCreateForm):
|
||||
self.fields['trainer_email'].initial = _(u'heinzel@alpenverein-karlsruhe.de')
|
||||
|
||||
def clean_trainer_phone(self):
|
||||
return re.sub(r'[-.]', ' ', self.cleaned_data['trainer_phone'])
|
||||
return re.sub(r'[-./]', ' ', self.cleaned_data['trainer_phone'])
|
||||
|
||||
def clean(self):
|
||||
super(TrainerForm, self).clean()
|
||||
|
||||
@@ -475,6 +475,15 @@ class Event(models.Model):
|
||||
return u'%s %s' % (self.trainer_firstname, self.trainer_familyname)
|
||||
|
||||
def get_template_context(self, context=None):
|
||||
if self.alt_last_day:
|
||||
day_after = self.alt_last_day + datetime.timedelta(1)
|
||||
elif self.last_day:
|
||||
day_after = self.last_day + datetime.timedelta(1)
|
||||
elif self.alt_first_day:
|
||||
day_after = self.alt_first_day + datetime.timedelta(1)
|
||||
else:
|
||||
day_after = self.first_day + datetime.timedelta(1)
|
||||
|
||||
r = {
|
||||
'event': self,
|
||||
'status': self.get_status(),
|
||||
@@ -493,6 +502,7 @@ class Event(models.Model):
|
||||
'alt_normalized_date': self.get_alt_formated_date(format='normalized'),
|
||||
'alt_normalized_long_date': self.get_alt_formated_date(format='normalized_long'),
|
||||
'alt_normalized_short_date': self.get_alt_formated_date(format='normalized_short'),
|
||||
'day_after': day_after,
|
||||
'country': self.country,
|
||||
'location': self.location,
|
||||
'transport': self.transport,
|
||||
|
||||
@@ -42,6 +42,7 @@ Veröffentlichung: {% if planned_publication_date %}{{ planned_publication_date|
|
||||
{% else %}<p>{{ course_goal_1|linebreaksbr }}</p>{% endif %}
|
||||
{% endif %}<hr id="system-readmore" />
|
||||
|
||||
<p>
|
||||
{% if requirements %}<strong>{% trans 'Anforderungen' %}:</strong> {{ requirements }}<br />
|
||||
{% endif %}{% if equipment %}<strong>{% trans 'Ausrüstung' %}:</strong> {{ equipment }}<br />
|
||||
{% endif %}{% if location %}<strong>{% trans 'Ort' %}:</strong> {{ location }} {% if country and country != 'DE' and country != 'XX' %}({{ country }}){% endif %}<br />
|
||||
@@ -59,7 +60,12 @@ Veröffentlichung: {% if planned_publication_date %}{{ planned_publication_date|
|
||||
{% endif %}{% if charge > 0 or additional_costs %}<strong>{% trans 'Kosten' %}:</strong> {% if charge > 0 %}{{ charge|floatformat:'-2' }} € {% trans 'Teilnahmegebühr' %}{% endif %}{% if additional_costs %}{% if charge > 0 %} {% trans 'zzgl.' %} {% endif %}{{ additional_costs }}{% endif %}<br />
|
||||
{% endif %}{% if registration_required and deadline %}<strong>{% trans 'Anmeldeschluss' %}:</strong> {{ deadline|date:'l, d. F Y' }}<br />
|
||||
{% endif %}{% if trainer_2_fullname %}{% if mode == 'training' %}<strong>{% trans 'Ausbildungsteam' %}:</strong>{% else %}<strong>{% trans 'Team' %}:</strong>{% endif %} {{ trainer_firstname }} {{ trainer_familyname }}, {{ trainer_2_fullname }}{% if trainer_3_fullname %}, {{ trainer_3_fullname }}{% endif %}<br />
|
||||
{% endif %}{% if trainer_familyname %}<strong>{% trans 'Leitung' %}:</strong> {{ trainer_firstname }} {{ trainer_familyname }}{% if trainer_email or trainer_phone %} ({% if trainer_email %}<a href="mailto:{{ trainer_email }}">{{ trainer_email }}</a>{% endif %}{% if trainer_email and trainer_phone %}, {% endif %}{% if trainer_phone %} {{ trainer_phone }}{% endif %}){% endif %}
|
||||
{% endif %}{% if registration_required and registration_howto %}
|
||||
<p>{{ registration_howto }}</p>
|
||||
{% endif %}{% if trainer_familyname %}<strong>{% trans 'Leitung' %}:</strong> {{ trainer_firstname }} {{ trainer_familyname }}{% if trainer_email or trainer_phone %} ({% if trainer_email %}<a href="mailto:{{ trainer_email }}">{{ trainer_email }}</a>{% endif %}{% if trainer_email and trainer_phone %}, {% endif %}{% if trainer_phone %}{{ trainer_phone }}{% endif %}){% endif %}
|
||||
{% endif %}</p>
|
||||
{% if registration_required and registration_howto %}<p>{{ registration_howto }}</p>
|
||||
{% endif %}
|
||||
---------- Veröffentlichung ----------
|
||||
{% 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
|
||||
Erstellungsdatum: {{ first_day|date:'d.m.Y' }} 00:00:00
|
||||
Titel: {{ number }} - {{ title }}
|
||||
Reference in New Issue
Block a user