From db9aebf911c5be0183dcadd7ae63c0c9af5b2e2b Mon Sep 17 00:00:00 2001 From: Jens Kleineheismann Date: Tue, 9 Jul 2019 11:27:06 +0200 Subject: [PATCH] ADD: dav_event_office: added some more information to participant list. --- .../dav_event_office/event_detail.html | 2 +- .../templates/dav_event_office/home.html | 2 +- .../dav_event_office/includes/home_tiles.html | 8 ++++---- .../dav_event_office/participant_list.html | 5 +++++ dav_events/models/participant.py | 19 +++++++++++++++++++ 5 files changed, 30 insertions(+), 6 deletions(-) diff --git a/dav_event_office/templates/dav_event_office/event_detail.html b/dav_event_office/templates/dav_event_office/event_detail.html index fb390ab..5e3e307 100644 --- a/dav_event_office/templates/dav_event_office/event_detail.html +++ b/dav_event_office/templates/dav_event_office/event_detail.html @@ -207,7 +207,7 @@ diff --git a/dav_event_office/templates/dav_event_office/home.html b/dav_event_office/templates/dav_event_office/home.html index e7ef3a3..299f54b 100644 --- a/dav_event_office/templates/dav_event_office/home.html +++ b/dav_event_office/templates/dav_event_office/home.html @@ -3,6 +3,6 @@ {% load i18n %} {% block page-container-fluid %} -

{% trans 'Touren- & Kursreferat' %}

+

{% trans 'Touren- & Kursreferat' %} / {% trans 'Geschäftsstelle' %}

{% include './includes/home_tiles.html' %} {% endblock page-container-fluid %} diff --git a/dav_event_office/templates/dav_event_office/includes/home_tiles.html b/dav_event_office/templates/dav_event_office/includes/home_tiles.html index 6598069..fb68229 100644 --- a/dav_event_office/templates/dav_event_office/includes/home_tiles.html +++ b/dav_event_office/templates/dav_event_office/includes/home_tiles.html @@ -4,7 +4,7 @@
-

Veranstaltungen (für Geschäftstelle)

+

{% trans 'Veranstaltungen' %} ({% trans 'Zugang nur für Geschäftstelle' %})

Hier sind alle Veranstaltungen gelistet.

- Veranstaltungen + {% trans 'Veranstaltungen' %}

-

Teilnehmer (für Geschäftstelle)

+

{% trans 'Teilnehmer' %} ({% trans 'Zugang nur für Geschäftstelle' %})

Hier sind alle angemeldeten Teilnehmer gelistet.

- Teilnehmer + {% trans 'Teilnehmer' %}

diff --git a/dav_event_office/templates/dav_event_office/participant_list.html b/dav_event_office/templates/dav_event_office/participant_list.html index 09d4f22..02fc370 100644 --- a/dav_event_office/templates/dav_event_office/participant_list.html +++ b/dav_event_office/templates/dav_event_office/participant_list.html @@ -59,6 +59,11 @@ +
+ {% bootstrap_icon 'envelope' %} + {% bootstrap_icon 'info-sign' %} +
{% csrf_token %} diff --git a/dav_events/models/participant.py b/dav_events/models/participant.py index 3be3ab4..4171c2d 100644 --- a/dav_events/models/participant.py +++ b/dav_events/models/participant.py @@ -65,6 +65,25 @@ class Participant(models.Model): def get_full_name(self): return '{} {}'.format(self.personal_names, self.family_names) + def get_info(self): + text = """{fullname} + {address}, {postal_code} {city} + + Notfallkontakt: + {emergency_contact} + + Anmerkung: + {note} + """ + return text.format( + fullname=self.get_full_name(), + address=self.address, + postal_code=self.postal_code, + city=self.city, + emergency_contact=self.emergency_contact, + note=self.note, + ) + def save(self, **kwargs): if not self.purge_at and self.event: self.purge_at = self.__class__.calc_purge_at(self.event)