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 += '
'; html += '' + feature.properties._title + ''; - html += ''; + html += ''; html += ''; if (feature.properties._link_events) html += ''; diff --git a/bemas/templates/bemas/container-contacts.html b/bemas/templates/bemas/container-contacts.html index 57d794af..8077f00d 100644 --- a/bemas/templates/bemas/container-contacts.html +++ b/bemas/templates/bemas/container-contacts.html @@ -5,7 +5,7 @@
Anspre diff --git a/bemas/templates/bemas/container-events.html b/bemas/templates/bemas/container-events.html index 38c1cc84..fc42496e 100644 --- a/bemas/templates/bemas/container-events.html +++ b/bemas/templates/bemas/container-events.html @@ -5,7 +5,7 @@
Journale diff --git a/bemas/templates/bemas/orphaned-data.html b/bemas/templates/bemas/orphaned-data.html index 6e62c8d1..14586b33 100644 --- a/bemas/templates/bemas/orphaned-data.html +++ b/bemas/templates/bemas/orphaned-data.html @@ -14,7 +14,7 @@
O @@ -31,7 +31,7 @@
Persone @@ -48,7 +48,7 @@
Ver diff --git a/bemas/tests/tests_codelist.py b/bemas/tests/tests_codelist.py index e153a5fc..9ce506ec 100644 --- a/bemas/tests/tests_codelist.py +++ b/bemas/tests/tests_codelist.py @@ -103,7 +103,7 @@ def test_tabledata_view_standard_rights(self): def test_tabledata_view_admin_rights(self): self.generic_view_test( True, True, 'codelists_status_tabledata', TABLEDATA_VIEW_PARAMS, 200, - 'application/json', 'bearbeiten' + 'application/json', 'ansehen oder bearbeiten' ) def test_table_view_no_rights(self): @@ -265,7 +265,7 @@ def test_tabledata_view_standard_rights(self): def test_tabledata_view_admin_rights(self): self.generic_view_test( True, True, 'codelists_sector_tabledata', TABLEDATA_VIEW_PARAMS, 200, - 'application/json', 'bearbeiten' + 'application/json', 'ansehen oder bearbeiten' ) def test_table_view_no_rights(self): @@ -432,7 +432,7 @@ def test_tabledata_view_standard_rights(self): def test_tabledata_view_admin_rights(self): self.generic_view_test( True, True, 'codelists_typeofevent_tabledata', TABLEDATA_VIEW_PARAMS, 200, - 'application/json', 'bearbeiten' + 'application/json', 'ansehen oder bearbeiten' ) def test_table_view_no_rights(self): @@ -599,7 +599,7 @@ def test_tabledata_view_standard_rights(self): def test_tabledata_view_admin_rights(self): self.generic_view_test( True, True, 'codelists_typeofimmission_tabledata', TABLEDATA_VIEW_PARAMS, 200, - 'application/json', 'bearbeiten' + 'application/json', 'ansehen oder bearbeiten' ) def test_table_view_no_rights(self): diff --git a/bemas/views/base.py b/bemas/views/base.py index 19510f26..47e91b73 100644 --- a/bemas/views/base.py +++ b/bemas/views/base.py @@ -84,7 +84,7 @@ def prepare_results(self, qs): text = str(value) if model.objects.filter(pk=value).exists(): text = '' + text + '' + '" title="Objekt ansehen oder bearbeiten">' + text + '' item_data.append(text) # log entry specific column "action" elif issubclass(self.model, LogEntry) and column.name == 'action': @@ -215,7 +215,7 @@ def prepare_results(self, qs): '' + + '" title="' + title + ' ansehen oder bearbeiten">' + '' return '' + \ + '" title="' + target_model._meta.verbose_name + ' ansehen oder bearbeiten">' + \ icon + ' ' + link_text + '' @@ -679,7 +679,7 @@ def transform_activity_objects(activity_objects): 'action': action, 'created_at': created_at, 'link': link, - 'tooltip': model_title + ' bearbeiten' if link else '' + 'tooltip': model_title + ' ansehen oder bearbeiten' if link else '' } activity_objects_list.append(activity_object_dict) return activity_objects_list