From 98622da2369715dd3a83661ac65590268de7a116 Mon Sep 17 00:00:00 2001 From: mmyllynen <4696381+dire@users.noreply.github.com> Date: Tue, 20 Jun 2023 08:51:20 +0300 Subject: [PATCH] UHF-8595: Update helfi_tpr_config configuration to display new unit fields. --- ...form_display.tpr_unit.tpr_unit.default.yml | 78 ++++++++++++++----- ...view_display.tpr_unit.tpr_unit.default.yml | 38 +++++++-- .../helfi_tpr_config/helfi_tpr_config.install | 9 +++ 3 files changed, 101 insertions(+), 24 deletions(-) diff --git a/modules/helfi_tpr_config/config/install/core.entity_form_display.tpr_unit.tpr_unit.default.yml b/modules/helfi_tpr_config/config/install/core.entity_form_display.tpr_unit.tpr_unit.default.yml index d9f377156..1957413b2 100644 --- a/modules/helfi_tpr_config/config/install/core.entity_form_display.tpr_unit.tpr_unit.default.yml +++ b/modules/helfi_tpr_config/config/install/core.entity_form_display.tpr_unit.tpr_unit.default.yml @@ -42,7 +42,7 @@ content: third_party_settings: { } accessibility_www: type: readonly_field_widget - weight: 12 + weight: 14 region: content settings: label: above @@ -52,7 +52,7 @@ content: third_party_settings: { } address: type: readonly_field_widget - weight: 14 + weight: 16 region: content settings: label: above @@ -62,7 +62,7 @@ content: third_party_settings: { } address_postal: type: readonly_field_widget - weight: 16 + weight: 18 region: content settings: label: above @@ -72,7 +72,17 @@ content: third_party_settings: { } call_charge_info: type: readonly_field_widget - weight: 15 + weight: 17 + region: content + settings: + label: above + formatter_type: null + formatter_settings: { } + show_description: false + third_party_settings: { } + contacts: + type: readonly_field_widget + weight: 28 region: content settings: label: above @@ -82,7 +92,7 @@ content: third_party_settings: { } description: type: readonly_field_widget - weight: 13 + weight: 15 region: content settings: label: above @@ -102,7 +112,7 @@ content: third_party_settings: { } field_content: type: paragraphs - weight: 27 + weight: 29 region: content settings: title: Paragraph @@ -121,7 +131,7 @@ content: third_party_settings: { } field_lower_content: type: paragraphs - weight: 28 + weight: 30 region: content settings: title: Paragraph @@ -140,14 +150,14 @@ content: third_party_settings: { } field_metatags: type: metatag_firehose - weight: 26 + weight: 24 region: content settings: sidebar: false third_party_settings: { } field_unit_type: type: entity_reference_autocomplete - weight: 28 + weight: 31 region: content settings: match_operator: CONTAINS @@ -157,7 +167,7 @@ content: third_party_settings: { } hide_sidebar_navigation: type: boolean_checkbox - weight: 29 + weight: 32 region: content settings: display_label: true @@ -171,7 +181,17 @@ content: third_party_settings: { } latitude: type: readonly_field_widget - weight: 17 + weight: 19 + region: content + settings: + label: above + formatter_type: null + formatter_settings: { } + show_description: false + third_party_settings: { } + links: + type: readonly_field_widget + weight: 27 region: content settings: label: above @@ -181,7 +201,7 @@ content: third_party_settings: { } longitude: type: readonly_field_widget - weight: 18 + weight: 20 region: content settings: label: above @@ -207,9 +227,19 @@ content: size: 60 placeholder: '' third_party_settings: { } + other_info: + type: readonly_field_widget + weight: 25 + region: content + settings: + label: above + formatter_type: null + formatter_settings: { } + show_description: false + third_party_settings: { } path: type: path - weight: 11 + weight: 13 region: content settings: { } third_party_settings: { } @@ -240,9 +270,19 @@ content: settings: media_types: { } third_party_settings: { } + price_info: + type: readonly_field_widget + weight: 26 + region: content + settings: + label: above + formatter_type: null + formatter_settings: { } + show_description: false + third_party_settings: { } provided_languages: type: readonly_field_widget - weight: 30 + weight: 33 region: content settings: label: above @@ -252,7 +292,7 @@ content: third_party_settings: { } service_map_embed: type: readonly_field_widget - weight: 20 + weight: 22 region: content settings: label: above @@ -262,7 +302,7 @@ content: third_party_settings: { } services: type: readonly_field_widget - weight: 21 + weight: 23 region: content settings: label: above @@ -272,19 +312,19 @@ content: third_party_settings: { } show_www: type: boolean_checkbox - weight: 11 + weight: 12 region: content settings: display_label: true third_party_settings: { } simple_sitemap: - weight: 10 + weight: 11 region: content settings: { } third_party_settings: { } streetview_entrance_url: type: readonly_field_widget - weight: 19 + weight: 21 region: content settings: label: above diff --git a/modules/helfi_tpr_config/config/install/core.entity_view_display.tpr_unit.tpr_unit.default.yml b/modules/helfi_tpr_config/config/install/core.entity_view_display.tpr_unit.tpr_unit.default.yml index 455adc48b..d8cdd3ce9 100644 --- a/modules/helfi_tpr_config/config/install/core.entity_view_display.tpr_unit.tpr_unit.default.yml +++ b/modules/helfi_tpr_config/config/install/core.entity_view_display.tpr_unit.tpr_unit.default.yml @@ -42,7 +42,7 @@ content: label: hidden settings: { } third_party_settings: { } - weight: 19 + weight: 21 region: content accessibility_www: type: link @@ -78,6 +78,13 @@ content: third_party_settings: { } weight: 11 region: content + contacts: + type: tpr_connection + label: hidden + settings: { } + third_party_settings: { } + weight: 26 + region: content description: type: text_default label: hidden @@ -100,7 +107,7 @@ content: view_mode: default link: '' third_party_settings: { } - weight: 18 + weight: 20 region: content field_lower_content: type: entity_reference_revisions_entity_view @@ -109,7 +116,7 @@ content: view_mode: default link: '' third_party_settings: { } - weight: 20 + weight: 22 region: content field_metatags: type: metatag_empty_formatter @@ -123,7 +130,14 @@ content: label: hidden settings: { } third_party_settings: { } - weight: 22 + weight: 24 + region: content + links: + type: tpr_connection + label: hidden + settings: { } + third_party_settings: { } + weight: 25 region: content name: type: string @@ -148,6 +162,13 @@ content: third_party_settings: { } weight: 7 region: content + other_info: + type: tpr_connection + label: hidden + settings: { } + third_party_settings: { } + weight: 18 + region: content phone: type: telephone_link label: hidden @@ -174,13 +195,20 @@ content: third_party_settings: { } weight: 4 region: content + price_info: + type: tpr_connection + label: hidden + settings: { } + third_party_settings: { } + weight: 19 + region: content provided_languages: type: string label: hidden settings: link_to_entity: false third_party_settings: { } - weight: 21 + weight: 23 region: content service_map_embed: type: service_map_embed diff --git a/modules/helfi_tpr_config/helfi_tpr_config.install b/modules/helfi_tpr_config/helfi_tpr_config.install index 973b5ee86..a3ba8506e 100644 --- a/modules/helfi_tpr_config/helfi_tpr_config.install +++ b/modules/helfi_tpr_config/helfi_tpr_config.install @@ -218,3 +218,12 @@ function helfi_tpr_config_update_9038(): void { \Drupal::service('helfi_platform_config.config_update_helper') ->update('helfi_tpr_config'); } + +/** + * UHF-8595 Update unit view and form display configs to show new fields. + */ +function helfi_tpr_config_update_9039(): void { + // Re-import 'helfi_tpr_config' configuration. + \Drupal::service('helfi_platform_config.config_update_helper') + ->update('helfi_tpr_config'); +}