From 1f7e588f7ef71b30c0a0c33ca0c77ee64e4e9544 Mon Sep 17 00:00:00 2001 From: Diego Steiner Date: Tue, 12 Sep 2023 16:26:07 +0200 Subject: [PATCH] add siblings in layer to person details view --- app/views/people/_details_pbs.html.haml | 10 +++++++++- app/views/people/_fields_pbs.html.haml | 3 --- config/locales/views.pbs.de.yml | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/views/people/_details_pbs.html.haml b/app/views/people/_details_pbs.html.haml index 669040b9a..2787d4094 100644 --- a/app/views/people/_details_pbs.html.haml +++ b/app/views/people/_details_pbs.html.haml @@ -4,6 +4,14 @@ -# https://github.com/hitobito/hitobito_pbs. = render_attrs(entry, :pbs_number, :salutation, :correspondence_language, - :grade_of_school, :brother_and_sisters) + :grade_of_school) + +%dl.dl-horizontal + = labeled(t('people.fields_pbs.siblings_in_layer', layer: parent.layer_group)) do + - if entry.has_siblings_in_layer(parent.layer_group) + = simple_list entry.siblings_in_layer(parent.layer_group) do |sibling_role| + - assoc_link(sibling_role.person) + - else + = t('global.associations.no_entry') = render_attrs(entry, :entry_date, :leaving_date) diff --git a/app/views/people/_fields_pbs.html.haml b/app/views/people/_fields_pbs.html.haml index dc14d6812..ff30e8d67 100644 --- a/app/views/people/_fields_pbs.html.haml +++ b/app/views/people/_fields_pbs.html.haml @@ -17,6 +17,3 @@ = field_set_tag do = f.labeled_input_fields(:entry_date, :leaving_date) - -= field_set_tag do - = f.labeled_input_field(:brother_and_sisters, caption: t('.in_abteilung')) diff --git a/config/locales/views.pbs.de.yml b/config/locales/views.pbs.de.yml index 5c344f9b3..b536b5974 100644 --- a/config/locales/views.pbs.de.yml +++ b/config/locales/views.pbs.de.yml @@ -349,6 +349,7 @@ de: fields_pbs: non_automatic_field: Dies ist kein automatisches Feld und muss manuell angepasst werden. in_abteilung: (in der Abteilung) + siblings_in_layer: Geschwister in %{layer} qualification_buttons_pbs: print_course_confirmation: Kursbestätigung drucken household_attrs_pbs: