From f6f2ff6e1f32e4b5c29801f91bd05cd191718ea6 Mon Sep 17 00:00:00 2001 From: j-mys Date: Fri, 22 Dec 2023 10:36:27 +0200 Subject: [PATCH 1/6] UHF-9193: add maternity clinic search for landing page content type --- ....field.node.landing_page.field_content.yml | 67 ++++++++++++++++--- 1 file changed, 57 insertions(+), 10 deletions(-) diff --git a/conf/cmi/field.field.node.landing_page.field_content.yml b/conf/cmi/field.field.node.landing_page.field_content.yml index 8db31e11..da93aed5 100644 --- a/conf/cmi/field.field.node.landing_page.field_content.yml +++ b/conf/cmi/field.field.node.landing_page.field_content.yml @@ -17,6 +17,7 @@ dependencies: - paragraphs.paragraphs_type.liftup_with_image - paragraphs.paragraphs_type.list_of_links - paragraphs.paragraphs_type.map + - paragraphs.paragraphs_type.maternity_and_child_health_clini - paragraphs.paragraphs_type.news_list - paragraphs.paragraphs_type.phasing - paragraphs.paragraphs_type.popular_services @@ -45,39 +46,55 @@ settings: handler: 'default:paragraph' handler_settings: target_bundles: + banner: banner + chart: chart columns: columns - list_of_links: list_of_links content_cards: content_cards content_liftup: content_liftup - banner: banner - liftup_with_image: liftup_with_image + event_list: event_list from_library: from_library - chart: chart - remote_video: remote_video + health_station_search: health_station_search + hearings: hearings + liftup_with_image: liftup_with_image + list_of_links: list_of_links map: map news_list: news_list - event_list: event_list phasing: phasing popular_services: popular_services + remote_video: remote_video + service_list: service_list + service_list_search: service_list_search target_group_links: target_group_links unit_accessibility_information: unit_accessibility_information unit_contact_card: unit_contact_card unit_search: unit_search - service_list: service_list - service_list_search: service_list_search - hearings: hearings - health_station_search: health_station_search + maternity_and_child_health_clini: maternity_and_child_health_clini negate: 0 target_bundles_drag_drop: + accordion: + weight: 38 + enabled: false + accordion_item: + weight: 39 + enabled: false banner: weight: 0 enabled: true + calculator: + weight: 41 + enabled: false chart: weight: 0 enabled: true columns: weight: 0 enabled: true + contact_card: + weight: 44 + enabled: false + contact_card_listing: + weight: 45 + enabled: false content_cards: weight: 0 enabled: true @@ -96,21 +113,39 @@ settings: hearings: weight: 0 enabled: true + hero: + weight: 52 + enabled: false + image: + weight: 53 + enabled: false liftup_with_image: weight: 0 enabled: true list_of_links: weight: 0 enabled: true + list_of_links_item: + weight: 56 + enabled: false map: weight: 0 enabled: true + maternity_and_child_health_clini: + weight: 58 + enabled: true news_list: weight: 0 enabled: true phasing: weight: 0 enabled: true + phasing_item: + weight: 61 + enabled: false + popular_service_item: + weight: 62 + enabled: false popular_services: weight: 0 enabled: true @@ -123,9 +158,21 @@ settings: service_list_search: weight: 0 enabled: true + sidebar_text: + weight: 67 + enabled: false + social_media_link: + weight: 68 + enabled: false + target_group_link_item: + weight: 69 + enabled: false target_group_links: weight: 0 enabled: true + text: + weight: 71 + enabled: false unit_accessibility_information: weight: 0 enabled: true From dd08de41389032ebd66154931dc9f1b16a8ea30e Mon Sep 17 00:00:00 2001 From: j-mys Date: Fri, 22 Dec 2023 10:58:31 +0200 Subject: [PATCH 2/6] UHF-9193: add maternity clinic config --- ...ternity_and_child_health_clini.default.yml | 34 +++++++++++++++++++ ...ternity_and_child_health_clini.default.yml | 32 +++++++++++++++++ ...th_clini.field_comp_search_description.yml | 26 ++++++++++++++ ...d_health_clini.field_comp_search_title.yml | 19 +++++++++++ ..._type.maternity_and_child_health_clini.yml | 2 ++ ..._type.maternity_and_child_health_clini.yml | 10 ++++++ 6 files changed, 123 insertions(+) create mode 100644 conf/cmi/core.entity_form_display.paragraph.maternity_and_child_health_clini.default.yml create mode 100644 conf/cmi/core.entity_view_display.paragraph.maternity_and_child_health_clini.default.yml create mode 100644 conf/cmi/field.field.paragraph.maternity_and_child_health_clini.field_comp_search_description.yml create mode 100644 conf/cmi/field.field.paragraph.maternity_and_child_health_clini.field_comp_search_title.yml create mode 100644 conf/cmi/language/fi/paragraphs.paragraphs_type.maternity_and_child_health_clini.yml create mode 100644 conf/cmi/paragraphs.paragraphs_type.maternity_and_child_health_clini.yml diff --git a/conf/cmi/core.entity_form_display.paragraph.maternity_and_child_health_clini.default.yml b/conf/cmi/core.entity_form_display.paragraph.maternity_and_child_health_clini.default.yml new file mode 100644 index 00000000..439b5870 --- /dev/null +++ b/conf/cmi/core.entity_form_display.paragraph.maternity_and_child_health_clini.default.yml @@ -0,0 +1,34 @@ +uuid: 29700936-f444-4927-aec5-8441af0ce595 +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.maternity_and_child_health_clini.field_comp_search_description + - field.field.paragraph.maternity_and_child_health_clini.field_comp_search_title + - paragraphs.paragraphs_type.maternity_and_child_health_clini + module: + - text +id: paragraph.maternity_and_child_health_clini.default +targetEntityType: paragraph +bundle: maternity_and_child_health_clini +mode: default +content: + field_comp_search_description: + type: text_textarea + weight: 1 + region: content + settings: + rows: 5 + placeholder: '' + third_party_settings: { } + field_comp_search_title: + type: string_textfield + weight: 0 + region: content + settings: + size: 60 + placeholder: '' + third_party_settings: { } +hidden: + created: true + status: true diff --git a/conf/cmi/core.entity_view_display.paragraph.maternity_and_child_health_clini.default.yml b/conf/cmi/core.entity_view_display.paragraph.maternity_and_child_health_clini.default.yml new file mode 100644 index 00000000..4268c215 --- /dev/null +++ b/conf/cmi/core.entity_view_display.paragraph.maternity_and_child_health_clini.default.yml @@ -0,0 +1,32 @@ +uuid: c1eca733-4791-4a4f-8702-e50efaa32ad7 +langcode: en +status: true +dependencies: + config: + - field.field.paragraph.maternity_and_child_health_clini.field_comp_search_description + - field.field.paragraph.maternity_and_child_health_clini.field_comp_search_title + - paragraphs.paragraphs_type.maternity_and_child_health_clini + module: + - text +id: paragraph.maternity_and_child_health_clini.default +targetEntityType: paragraph +bundle: maternity_and_child_health_clini +mode: default +content: + field_comp_search_description: + type: text_default + label: hidden + settings: { } + third_party_settings: { } + weight: 1 + region: content + field_comp_search_title: + type: string + label: hidden + settings: + link_to_entity: false + third_party_settings: { } + weight: 0 + region: content +hidden: + search_api_excerpt: true diff --git a/conf/cmi/field.field.paragraph.maternity_and_child_health_clini.field_comp_search_description.yml b/conf/cmi/field.field.paragraph.maternity_and_child_health_clini.field_comp_search_description.yml new file mode 100644 index 00000000..34616484 --- /dev/null +++ b/conf/cmi/field.field.paragraph.maternity_and_child_health_clini.field_comp_search_description.yml @@ -0,0 +1,26 @@ +uuid: f3264df4-d1a7-4218-80a1-ea18cef385a1 +langcode: fi +status: true +dependencies: + config: + - field.storage.paragraph.field_comp_search_description + - paragraphs.paragraphs_type.maternity_and_child_health_clini + module: + - allowed_formats + - text +third_party_settings: + allowed_formats: + allowed_formats: { } +id: paragraph.maternity_and_child_health_clini.field_comp_search_description +field_name: field_comp_search_description +entity_type: paragraph +bundle: maternity_and_child_health_clini +label: Description +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + allowed_formats: { } +field_type: text_long diff --git a/conf/cmi/field.field.paragraph.maternity_and_child_health_clini.field_comp_search_title.yml b/conf/cmi/field.field.paragraph.maternity_and_child_health_clini.field_comp_search_title.yml new file mode 100644 index 00000000..2b350a94 --- /dev/null +++ b/conf/cmi/field.field.paragraph.maternity_and_child_health_clini.field_comp_search_title.yml @@ -0,0 +1,19 @@ +uuid: b974b07d-590b-48f2-8bf7-bac3ca674758 +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_comp_search_title + - paragraphs.paragraphs_type.maternity_and_child_health_clini +id: paragraph.maternity_and_child_health_clini.field_comp_search_title +field_name: field_comp_search_title +entity_type: paragraph +bundle: maternity_and_child_health_clini +label: Title +description: '' +required: true +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/conf/cmi/language/fi/paragraphs.paragraphs_type.maternity_and_child_health_clini.yml b/conf/cmi/language/fi/paragraphs.paragraphs_type.maternity_and_child_health_clini.yml new file mode 100644 index 00000000..5983fad3 --- /dev/null +++ b/conf/cmi/language/fi/paragraphs.paragraphs_type.maternity_and_child_health_clini.yml @@ -0,0 +1,2 @@ +label: Neuvolahaku +description: 'Tarjoaa haun lähimmän neuvolan löytämiseen' diff --git a/conf/cmi/paragraphs.paragraphs_type.maternity_and_child_health_clini.yml b/conf/cmi/paragraphs.paragraphs_type.maternity_and_child_health_clini.yml new file mode 100644 index 00000000..5c439a9c --- /dev/null +++ b/conf/cmi/paragraphs.paragraphs_type.maternity_and_child_health_clini.yml @@ -0,0 +1,10 @@ +uuid: 3febcb44-9c90-4098-aa40-f877afb0d341 +langcode: en +status: true +dependencies: { } +id: maternity_and_child_health_clini +label: 'Maternity and child health clinic' +icon_uuid: null +icon_default: null +description: 'Provides a paragraph for searching / filtering maternity and child health clinics.' +behavior_plugins: { } From f6267eb279ef60967a02205fefa7a6aab9ecccb3 Mon Sep 17 00:00:00 2001 From: j-mys Date: Fri, 22 Dec 2023 12:01:45 +0200 Subject: [PATCH 3/6] UHF-9193: fix hero styling --- public/modules/custom/helfi_sote/helfi_sote.module | 1 + 1 file changed, 1 insertion(+) diff --git a/public/modules/custom/helfi_sote/helfi_sote.module b/public/modules/custom/helfi_sote/helfi_sote.module index ab265e34..54ee8f85 100644 --- a/public/modules/custom/helfi_sote/helfi_sote.module +++ b/public/modules/custom/helfi_sote/helfi_sote.module @@ -135,6 +135,7 @@ function helfi_sote_preprocess_block(&$variables) { // and add classes accordingly. $paragraph_types = [ 'health_station_search', + 'maternity_and_child_health_clini', ]; if (in_array($paragraph->getType(), $paragraph_types)) { From 0abfa3fec98361baf5eff341b0a8bd954ee6f8f7 Mon Sep 17 00:00:00 2001 From: j-mys Date: Fri, 22 Dec 2023 14:16:35 +0200 Subject: [PATCH 4/6] UHF-9193: fix config changes --- ....field.node.landing_page.field_content.yml | 50 ++----------------- ...th_clini.field_comp_search_description.yml | 2 +- 2 files changed, 5 insertions(+), 47 deletions(-) diff --git a/conf/cmi/field.field.node.landing_page.field_content.yml b/conf/cmi/field.field.node.landing_page.field_content.yml index da93aed5..b2d4c1f5 100644 --- a/conf/cmi/field.field.node.landing_page.field_content.yml +++ b/conf/cmi/field.field.node.landing_page.field_content.yml @@ -71,30 +71,15 @@ settings: maternity_and_child_health_clini: maternity_and_child_health_clini negate: 0 target_bundles_drag_drop: - accordion: - weight: 38 - enabled: false - accordion_item: - weight: 39 - enabled: false banner: weight: 0 enabled: true - calculator: - weight: 41 - enabled: false chart: weight: 0 enabled: true columns: weight: 0 enabled: true - contact_card: - weight: 44 - enabled: false - contact_card_listing: - weight: 45 - enabled: false content_cards: weight: 0 enabled: true @@ -113,39 +98,21 @@ settings: hearings: weight: 0 enabled: true - hero: - weight: 52 - enabled: false - image: - weight: 53 - enabled: false liftup_with_image: weight: 0 enabled: true list_of_links: weight: 0 enabled: true - list_of_links_item: - weight: 56 - enabled: false map: weight: 0 enabled: true - maternity_and_child_health_clini: - weight: 58 - enabled: true news_list: weight: 0 enabled: true phasing: weight: 0 enabled: true - phasing_item: - weight: 61 - enabled: false - popular_service_item: - weight: 62 - enabled: false popular_services: weight: 0 enabled: true @@ -158,21 +125,9 @@ settings: service_list_search: weight: 0 enabled: true - sidebar_text: - weight: 67 - enabled: false - social_media_link: - weight: 68 - enabled: false - target_group_link_item: - weight: 69 - enabled: false target_group_links: weight: 0 enabled: true - text: - weight: 71 - enabled: false unit_accessibility_information: weight: 0 enabled: true @@ -182,4 +137,7 @@ settings: unit_search: weight: 0 enabled: true -field_type: entity_reference_revisions + maternity_and_child_health_clini: + weight: 0 + enabled: true +field_type: entity_reference_revisions \ No newline at end of file diff --git a/conf/cmi/field.field.paragraph.maternity_and_child_health_clini.field_comp_search_description.yml b/conf/cmi/field.field.paragraph.maternity_and_child_health_clini.field_comp_search_description.yml index 34616484..e0686e49 100644 --- a/conf/cmi/field.field.paragraph.maternity_and_child_health_clini.field_comp_search_description.yml +++ b/conf/cmi/field.field.paragraph.maternity_and_child_health_clini.field_comp_search_description.yml @@ -1,5 +1,5 @@ uuid: f3264df4-d1a7-4218-80a1-ea18cef385a1 -langcode: fi +langcode: en status: true dependencies: config: From c700fcdf1b3fa5d4a443b09eea9630adcfaeccc3 Mon Sep 17 00:00:00 2001 From: j-mys Date: Fri, 22 Dec 2023 14:19:21 +0200 Subject: [PATCH 5/6] UHF-9193: improve style --- conf/cmi/field.field.node.landing_page.field_content.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/cmi/field.field.node.landing_page.field_content.yml b/conf/cmi/field.field.node.landing_page.field_content.yml index b2d4c1f5..c94808da 100644 --- a/conf/cmi/field.field.node.landing_page.field_content.yml +++ b/conf/cmi/field.field.node.landing_page.field_content.yml @@ -140,4 +140,5 @@ settings: maternity_and_child_health_clini: weight: 0 enabled: true -field_type: entity_reference_revisions \ No newline at end of file +field_type: entity_reference_revisions + From 8c70b1aeb077a42878a0fa94d2f557678492561a Mon Sep 17 00:00:00 2001 From: j-mys Date: Fri, 22 Dec 2023 14:35:34 +0200 Subject: [PATCH 6/6] UHF-9193: add specific paragraph types --- public/modules/custom/helfi_sote/helfi_sote.module | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/modules/custom/helfi_sote/helfi_sote.module b/public/modules/custom/helfi_sote/helfi_sote.module index 54ee8f85..472b5c7c 100644 --- a/public/modules/custom/helfi_sote/helfi_sote.module +++ b/public/modules/custom/helfi_sote/helfi_sote.module @@ -71,6 +71,8 @@ function helfi_sote_helfi_paragraph_types() : array { 'field_content' => [ 'unit_accessibility_information', 'unit_contact_card', + 'health_station_search', + 'maternity_and_child_health_clini', ], ], ],