diff --git a/bemas/models/models_objectclass.py b/bemas/models/models_objectclass.py index db3e17ba..e8c1cb19 100644 --- a/bemas/models/models_objectclass.py +++ b/bemas/models/models_objectclass.py @@ -356,7 +356,18 @@ def __str__(self): (' mit der Funktion ' + self.function if self.function else '') def name_and_function(self): - return str(self.person) + (' (Funktion: ' + self.function + ')' if self.function else '') + function_str = ' (Funktion: ' + self.function + ')' if self.function else '' + if self.person.telephone_numbers or self.person.email_addresses: + contact_data_str = ' – Kontakt: ' + if self.person.telephone_numbers and type(self.person.telephone_numbers) is list: + contact_data_str += ', '.join(self.person.telephone_numbers) + if self.person.email_addresses and type(self.person.email_addresses) is list: + contact_data_str += ', ' + if self.person.email_addresses and type(self.person.email_addresses) is list: + contact_data_str += ', '.join(self.person.email_addresses) + else: + contact_data_str = '' + return str(self.person) + function_str + contact_data_str def save(self, force_insert=False, force_update=False, using=None, update_fields=None): # (1/2) store search content in designated field of object class organization: diff --git a/bemas/static/bemas/js/map.js b/bemas/static/bemas/js/map.js index 38820c57..b39b82b5 100644 --- a/bemas/static/bemas/js/map.js +++ b/bemas/static/bemas/js/map.js @@ -229,7 +229,7 @@ function setGeoJsonFeaturePropertiesAndActions(feature, layer) { let html = ''; html += '