From 649f9be601e774336fb346385a836c0a7bb5000a Mon Sep 17 00:00:00 2001 From: rpnykanen Date: Wed, 24 Jul 2024 11:21:55 +0300 Subject: [PATCH 1/9] UHF-9642: intermediate readme update commit --- README.md | 85 +++++++++++++++++++ .../modules/custom/helfi_kymp_plans/README.md | 0 2 files changed, 85 insertions(+) create mode 100644 public/modules/custom/helfi_kymp_plans/README.md diff --git a/README.md b/README.md index 7c9e843af..7d693b2de 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # City of Helsinki - Liikenne Drupal +Kaupunkiympäristö ja liikenne (Kymp) is a site which contains information about the city itself, the development of the city and transportation. + ## Environments Env | Branch | URL @@ -43,3 +45,86 @@ Modify the value of `COMPOSE_PROFILES` environment variable from `.env` file or ### Available profiles: - `search` - `queue` + +## Instance specific features + +### Helfi kymp migrations + +Most likely useless module to be disabled and removed. REMOVE THIS FROM DOCUMENTATION IF THE CUSTOM MODULE HAS BEEN REMOVED. + + +### Custom test content + +Uses helfi_test_content-module to add test data so developer can test the components without need to manually create content. + + +### Plans (Suunnitelmat) + +Plans lists city development plans for people to see and comment +The paragraph can be seen [HERE](https://www.hel.fi/fi/kaupunkiymparisto-ja-liikenne/kaupunkisuunnittelu-ja-rakentaminen/osallistu-kaupungin-suunnitteluun) + +#### Used tools + +***Module:*** helfi_kymp_plans +***API:*** https://ptp.hel.fi/rss/nahtavana_nyt/ +***Cron:*** invalidate-tags-kymp + +#### How it works + +On site load the API is queried and result is cached. The plans are then shown on the page. +A simple javascript is used to hide and show the plans. +Cron is used to empty the cached plans once an hour. + + +### Project ??? + + + +### District and project search (Alue ja hankehaku) + +The search allows searching for city districts and city development projects. +It can be found from [HERE](https://www.hel.fi/fi/kaupunkiymparisto-ja-liikenne/kaupunkisuunnittelu-ja-rakentaminen/suunnitelmat-ja-rakennushankkeet) +City districts were imported using helfi_kymp_migrations module (might have been removed) + +#### Used tools + +***Module:*** part of helfi_kymp_content +***API:*** +***React:*** district-and-project-search + +#### How it works + + +### Journey planner / plans ? list of plans ? +#### Used tools +#### How it works + + +### District/Subdistrict ??? +#### How it works + + +### Snow ploughing schedule (Aurausaikataulu) + +Ploughing schedule is a tool which allows user to get estimated snow ploughing schedule for a specific street. +Currently the search tool is located only [HERE](https://www.hel.fi/fi/kaupunkiymparisto-ja-liikenne/kunnossapito/katujen-kunnossapito/katujen-talvikunnossapito) + +#### Used tools + +- **Module**: helfi_kymp_content +- **Cron:** street_data +- **Street-data api:** https://kartta.hel.fi/ws/geoserver/avoindata/wfs +- **ElasticSearch:** street_data -index +- **React:** hdbt/ploughing-schedule + +#### How it works + +Unlike other ElasticSearch implementation, ploughing schedule is not using Drupal database as a datasource. +The data is directly fetched from API and indexed into ElasticSearch. Cron is used to automatically index the data to street_data index once a day. + +UI is a simple react-application. + + + + + diff --git a/public/modules/custom/helfi_kymp_plans/README.md b/public/modules/custom/helfi_kymp_plans/README.md new file mode 100644 index 000000000..e69de29bb From 752abdf5042fbf62c6e10481d12f26a81bfc4753 Mon Sep 17 00:00:00 2001 From: rpnykanen Date: Wed, 24 Jul 2024 12:20:22 +0300 Subject: [PATCH 2/9] UHF-9642: more documentation --- README.md | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 7d693b2de..446fcb0ff 100644 --- a/README.md +++ b/README.md @@ -48,14 +48,21 @@ Modify the value of `COMPOSE_PROFILES` environment variable from `.env` file or ## Instance specific features -### Helfi kymp migrations +### Project -content type (Hanke) -Most likely useless module to be disabled and removed. REMOVE THIS FROM DOCUMENTATION IF THE CUSTOM MODULE HAS BEEN REMOVED. +A content which can be searched with `District and project search`. +### Area -content type (Alue) -### Custom test content +A content type which has a node for every district and subdistrict in Helsinki. The page contains some content related to the district and +a `subdistrict block` in sidebar. -Uses helfi_test_content-module to add test data so developer can test the components without need to manually create content. + +### Subdistrict block + +A block in Area -content type page's sidebar which lists district and subdistricts related to the current content. + +***Module:*** part of helfi_kymp_content ### Plans (Suunnitelmat) @@ -63,8 +70,6 @@ Uses helfi_test_content-module to add test data so developer can test the compon Plans lists city development plans for people to see and comment The paragraph can be seen [HERE](https://www.hel.fi/fi/kaupunkiymparisto-ja-liikenne/kaupunkisuunnittelu-ja-rakentaminen/osallistu-kaupungin-suunnitteluun) -#### Used tools - ***Module:*** helfi_kymp_plans ***API:*** https://ptp.hel.fi/rss/nahtavana_nyt/ ***Cron:*** invalidate-tags-kymp @@ -76,18 +81,12 @@ A simple javascript is used to hide and show the plans. Cron is used to empty the cached plans once an hour. -### Project ??? - - - ### District and project search (Alue ja hankehaku) The search allows searching for city districts and city development projects. It can be found from [HERE](https://www.hel.fi/fi/kaupunkiymparisto-ja-liikenne/kaupunkisuunnittelu-ja-rakentaminen/suunnitelmat-ja-rakennushankkeet) City districts were imported using helfi_kymp_migrations module (might have been removed) -#### Used tools - ***Module:*** part of helfi_kymp_content ***API:*** ***React:*** district-and-project-search @@ -95,22 +94,20 @@ City districts were imported using helfi_kymp_migrations module (might have been #### How it works -### Journey planner / plans ? list of plans ? -#### Used tools -#### How it works +### Journey planner (Reittiopas) +An external tool by HSL which allows to find routes, for example [pyöräilyreittihaku](https://www.hel.fi/fi/kaupunkiymparisto-ja-liikenne/pyoraily/pyorareitit) -### District/Subdistrict ??? #### How it works +An iframe is added to the page which allows searching for routes. + ### Snow ploughing schedule (Aurausaikataulu) Ploughing schedule is a tool which allows user to get estimated snow ploughing schedule for a specific street. Currently the search tool is located only [HERE](https://www.hel.fi/fi/kaupunkiymparisto-ja-liikenne/kunnossapito/katujen-kunnossapito/katujen-talvikunnossapito) -#### Used tools - - **Module**: helfi_kymp_content - **Cron:** street_data - **Street-data api:** https://kartta.hel.fi/ws/geoserver/avoindata/wfs @@ -125,6 +122,11 @@ The data is directly fetched from API and indexed into ElasticSearch. Cron is us UI is a simple react-application. +### Custom test content (module) + +Uses helfi_test_content-module to add test data so developer can test the components without need to manually create content. +### Helfi kymp migrations (module) +Most likely useless module to be disabled and removed. REMOVE THIS FROM DOCUMENTATION IF THE CUSTOM MODULE HAS BEEN REMOVED. From f589949546e79a7e30a531ff0acccfa576929e4c Mon Sep 17 00:00:00 2001 From: rpnykanen Date: Wed, 24 Jul 2024 12:21:43 +0300 Subject: [PATCH 3/9] UHF-9642: update project url --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 446fcb0ff..1afc332e3 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Kaupunkiympäristö ja liikenne (Kymp) is a site which contains information abou Env | Branch | URL --- |--------| --- local | dev | http://helfi-kymp.docker.so/ -production | main | TBD +production | main | https://hel.fi/fi/kaupunkiymparisto-ja-liikenne ## Requirements From 8d88a08bf8c0e944c40a93b9c5c2766cf31b10d0 Mon Sep 17 00:00:00 2001 From: rpnykanen Date: Wed, 24 Jul 2024 14:01:23 +0300 Subject: [PATCH 4/9] UHF-9642: more documentation --- public/modules/custom/helfi_kymp_plans/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/modules/custom/helfi_kymp_plans/README.md b/public/modules/custom/helfi_kymp_plans/README.md index e69de29bb..1c0cfd065 100644 --- a/public/modules/custom/helfi_kymp_plans/README.md +++ b/public/modules/custom/helfi_kymp_plans/README.md @@ -0,0 +1,2 @@ +# Plans - Suunnitelmat + From 1e18db2b199e663df865305d891cbb787ff017c3 Mon Sep 17 00:00:00 2001 From: rpnykanen Date: Wed, 24 Jul 2024 14:09:10 +0300 Subject: [PATCH 5/9] UHF-9642: updated readme --- README.md | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 1afc332e3..4add78e5c 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,7 @@ Modify the value of `COMPOSE_PROFILES` environment variable from `.env` file or A content which can be searched with `District and project search`. + ### Area -content type (Alue) A content type which has a node for every district and subdistrict in Helsinki. The page contains some content related to the district and @@ -60,23 +61,23 @@ a `subdistrict block` in sidebar. ### Subdistrict block -A block in Area -content type page's sidebar which lists district and subdistricts related to the current content. +A block in `Area -content type` page's sidebar which lists district and subdistricts related to the current content. ***Module:*** part of helfi_kymp_content ### Plans (Suunnitelmat) -Plans lists city development plans for people to see and comment +Lists city development plans for people to see and comment The paragraph can be seen [HERE](https://www.hel.fi/fi/kaupunkiymparisto-ja-liikenne/kaupunkisuunnittelu-ja-rakentaminen/osallistu-kaupungin-suunnitteluun) -***Module:*** helfi_kymp_plans -***API:*** https://ptp.hel.fi/rss/nahtavana_nyt/ -***Cron:*** invalidate-tags-kymp +- ***Module:*** helfi_kymp_plans +- ***API:*** https://ptp.hel.fi/rss/nahtavana_nyt/ +- ***Cron:*** invalidate-tags-kymp #### How it works -On site load the API is queried and result is cached. The plans are then shown on the page. +On page load the API is queried and result is cached. The plans are then shown on the page. A simple javascript is used to hide and show the plans. Cron is used to empty the cached plans once an hour. @@ -87,12 +88,15 @@ The search allows searching for city districts and city development projects. It can be found from [HERE](https://www.hel.fi/fi/kaupunkiymparisto-ja-liikenne/kaupunkisuunnittelu-ja-rakentaminen/suunnitelmat-ja-rakennushankkeet) City districts were imported using helfi_kymp_migrations module (might have been removed) -***Module:*** part of helfi_kymp_content -***API:*** -***React:*** district-and-project-search +- ***Module:*** part of helfi_kymp_content +- ***React:*** district-and-project-search #### How it works +Districts and subdistricts has been added via helfi_kymp_migrations module (module might have been removed) +Projects are created manually by content creators. +Searching for projects work as any other react search. + ### Journey planner (Reittiopas) From 4de631eaf526f3cbcee7699246a808a8aaac773b Mon Sep 17 00:00:00 2001 From: Tero Elonen Date: Tue, 30 Jul 2024 19:42:20 +0300 Subject: [PATCH 6/9] UHF-9642: Improved the documentation a bit --- README.md | 78 +++++++++++++++++++++++-------------------------------- 1 file changed, 32 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index 4add78e5c..51041dd52 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,21 @@ -# City of Helsinki - Liikenne Drupal +# City of Helsinki - KYMP Drupal project -Kaupunkiympäristö ja liikenne (Kymp) is a site which contains information about the city itself, the development of the city and transportation. +KYMP, short for Kaupunkiympäristö ja liikenne, is a site that contains information about the city, its development, and +transportation. ## Environments - Env | Branch | URL --- |--------| --- local | dev | http://helfi-kymp.docker.so/ production | main | https://hel.fi/fi/kaupunkiymparisto-ja-liikenne ## Requirements - You need to have these applications installed to operate on all environments: - [Docker](https://github.com/druidfi/guidelines/blob/master/docs/docker.md) - [Stonehenge](https://github.com/druidfi/stonehenge) ## Create and start the environment - To install Drupal from scratch using existing configuration: `` @@ -31,7 +29,6 @@ $ make fresh `` ## Login to Drupal container - This will log you inside the app container: ``` @@ -39,7 +36,6 @@ $ make shell ``` ## Docker compose profiles - Modify the value of `COMPOSE_PROFILES` environment variable from `.env` file or start the project with `COMPOSE_RROFILES=your-profiles make up`. ### Available profiles: @@ -48,26 +44,25 @@ Modify the value of `COMPOSE_PROFILES` environment variable from `.env` file or ## Instance specific features -### Project -content type (Hanke) +### Custom node types +#### Project (project) A content which can be searched with `District and project search`. - -### Area -content type (Alue) - +#### Area (area) A content type which has a node for every district and subdistrict in Helsinki. The page contains some content related to the district and a `subdistrict block` in sidebar. +### Custom blocks -### Subdistrict block - +#### Subdistrict block A block in `Area -content type` page's sidebar which lists district and subdistricts related to the current content. ***Module:*** part of helfi_kymp_content +### Custom paragraphs -### Plans (Suunnitelmat) - +#### List of Plans (list_of_plans) Lists city development plans for people to see and comment The paragraph can be seen [HERE](https://www.hel.fi/fi/kaupunkiymparisto-ja-liikenne/kaupunkisuunnittelu-ja-rakentaminen/osallistu-kaupungin-suunnitteluun) @@ -75,42 +70,36 @@ The paragraph can be seen [HERE](https://www.hel.fi/fi/kaupunkiymparisto-ja-liik - ***API:*** https://ptp.hel.fi/rss/nahtavana_nyt/ - ***Cron:*** invalidate-tags-kymp -#### How it works - +##### How it works On page load the API is queried and result is cached. The plans are then shown on the page. A simple javascript is used to hide and show the plans. Cron is used to empty the cached plans once an hour. - -### District and project search (Alue ja hankehaku) - +#### District and project search (district_and_project_search) The search allows searching for city districts and city development projects. -It can be found from [HERE](https://www.hel.fi/fi/kaupunkiymparisto-ja-liikenne/kaupunkisuunnittelu-ja-rakentaminen/suunnitelmat-ja-rakennushankkeet) +It can be found from [here](https://www.hel.fi/fi/kaupunkiymparisto-ja-liikenne/kaupunkisuunnittelu-ja-rakentaminen/suunnitelmat-ja-rakennushankkeet) City districts were imported using helfi_kymp_migrations module (might have been removed) - ***Module:*** part of helfi_kymp_content - ***React:*** district-and-project-search -#### How it works - +##### How it works Districts and subdistricts has been added via helfi_kymp_migrations module (module might have been removed) Projects are created manually by content creators. Searching for projects work as any other react search. - -### Journey planner (Reittiopas) - +#### Journey planner (journey_planner) An external tool by HSL which allows to find routes, for example [pyöräilyreittihaku](https://www.hel.fi/fi/kaupunkiymparisto-ja-liikenne/pyoraily/pyorareitit) -#### How it works - +##### How it works An iframe is added to the page which allows searching for routes. +#### Ploughing schedule (ploughing_schedule) +The Ploughing Schedule paragraph is a tool that allows website users to get an estimated snow ploughing schedule for a +specific street. -### Snow ploughing schedule (Aurausaikataulu) - -Ploughing schedule is a tool which allows user to get estimated snow ploughing schedule for a specific street. -Currently the search tool is located only [HERE](https://www.hel.fi/fi/kaupunkiymparisto-ja-liikenne/kunnossapito/katujen-kunnossapito/katujen-talvikunnossapito) +This search functionality is built with React and does not have any fallback listing or similar feature. All +React-based searches are located in the `hdbt` theme, where most of the related logic is implemented. - **Module**: helfi_kymp_content - **Cron:** street_data @@ -118,19 +107,16 @@ Currently the search tool is located only [HERE](https://www.hel.fi/fi/kaupunkiy - **ElasticSearch:** street_data -index - **React:** hdbt/ploughing-schedule -#### How it works - -Unlike other ElasticSearch implementation, ploughing schedule is not using Drupal database as a datasource. -The data is directly fetched from API and indexed into ElasticSearch. Cron is used to automatically index the data to street_data index once a day. - -UI is a simple react-application. - - -### Custom test content (module) - -Uses helfi_test_content-module to add test data so developer can test the components without need to manually create content. - +##### How it works +Unlike other ElasticSearch implementations, the ploughing schedule does not use the Drupal database as a data source. +Instead, the data is directly fetched from an API and indexed into ElasticSearch. A cron job automatically indexes the +data into the `street_data` index once a day. The UI is a simple React application. -### Helfi kymp migrations (module) +### Helfi Custom Test Content (helfi_custom_test_content module) +This module depends on another test content creation module called `helfi_test_content`. The purpose of this module is +to provide additional custom test content unique to this instance, allowing developers to test components without +manually creating content. -Most likely useless module to be disabled and removed. REMOVE THIS FROM DOCUMENTATION IF THE CUSTOM MODULE HAS BEEN REMOVED. +### Helfi kymp migrations (helfi_kymp_migrations module) +Most likely useless module to be disabled and removed. REMOVE THIS FROM DOCUMENTATION IF THE CUSTOM MODULE HAS BEEN +REMOVED. From c472fef1eea8716ff1f7af6f6ce0da6665cba9c8 Mon Sep 17 00:00:00 2001 From: Tero Elonen Date: Wed, 31 Jul 2024 12:11:15 +0300 Subject: [PATCH 7/9] UHF-9642: Improved the documentation further --- README.md | 67 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 51041dd52..73b5e7bd7 100644 --- a/README.md +++ b/README.md @@ -46,55 +46,68 @@ Modify the value of `COMPOSE_PROFILES` environment variable from `.env` file or ### Custom node types +#### Area (area) +A content type that includes a node for every district and subdistrict in Helsinki. The page layout closely follows the +standard page layout. Each area can be either a district or a subdistrict, depending on the contents of the +Subdistricts (`field_subdistricts`) field on the node. The content was initially created automatically from Helsinki +city districts and subdistricts and is manually adjusted over time. + #### Project (project) -A content which can be searched with `District and project search`. -#### Area (area) -A content type which has a node for every district and subdistrict in Helsinki. The page contains some content related to the district and -a `subdistrict block` in sidebar. +A custom content type for the KYMP instance, closely related to the [area](#area-area) content type. Each project is +associated with an area via the entity reference field Project District (field_project_district). Projects can be +categorized in various ways and follow a layout similar to the standard page. Projects can be searched using the [District and Project Search](#district-and-project-search-district_and_project_search). ### Custom blocks #### Subdistrict block -A block in `Area -content type` page's sidebar which lists district and subdistricts related to the current content. +A block in the sidebar of pages with the content type [area](#area-area) lists subdistricts related to the viewed +district. The logic for this block is located in the custom module [`helfi_kymp_content`](https://github.com/City-of-Helsinki/drupal-helfi-kymp/tree/dev/public/modules/custom/helfi_kymp_content). -***Module:*** part of helfi_kymp_content +- **Module:** part of helfi_kymp_content ### Custom paragraphs #### List of Plans (list_of_plans) -Lists city development plans for people to see and comment -The paragraph can be seen [HERE](https://www.hel.fi/fi/kaupunkiymparisto-ja-liikenne/kaupunkisuunnittelu-ja-rakentaminen/osallistu-kaupungin-suunnitteluun) +This paragraph lists the city development plans for people to see and comment. -- ***Module:*** helfi_kymp_plans -- ***API:*** https://ptp.hel.fi/rss/nahtavana_nyt/ -- ***Cron:*** invalidate-tags-kymp +- **Module:** helfi_kymp_plans +- **API:** https://ptp.hel.fi/rss/nahtavana_nyt/ +- **Cron:** invalidate-tags-kymp ##### How it works -On page load the API is queried and result is cached. The plans are then shown on the page. -A simple javascript is used to hide and show the plans. -Cron is used to empty the cached plans once an hour. +The paragraph has configurable title and description fields, but the rest of the logic is hardcoded. On page load, the +API is queried and the result is cached. The plans are then displayed in the block. A simple JavaScript is used to +toggle the visibility of the plans. The related JavaScript and PHP code can be found [here](https://github.com/City-of-Helsinki/drupal-helfi-kymp/tree/dev/public/modules/custom/helfi_kymp_plans). +The template for the paragraph is located in the [`hdbt_subtheme`](https://github.com/City-of-Helsinki/drupal-helfi-kymp/blob/dev/public/themes/custom/hdbt_subtheme/templates/paragraph/paragraph--list-of-plans.html.twig). +Cron is used to clear the cached plans once an hour. + +#### District and Project Search (district_and_project_search) +The District and Project Search tool allows users to search for city districts and development projects. -#### District and project search (district_and_project_search) -The search allows searching for city districts and city development projects. -It can be found from [here](https://www.hel.fi/fi/kaupunkiymparisto-ja-liikenne/kaupunkisuunnittelu-ja-rakentaminen/suunnitelmat-ja-rakennushankkeet) -City districts were imported using helfi_kymp_migrations module (might have been removed) +The District and Project Search is a React search that uses views listing (`district_and_project_search`) as a fallback +when JavaScript is not enabled. All React searches are in the `hdbt` theme, so most of the related logic is also found +there. The district_and_project_search paragraph has an editable title and description. When development on the feature +started the city districts were imported using [`helfi_kymp_migrations`](#helfi-kymp-migrations-helfi_kymp_migrations-module) module. -- ***Module:*** part of helfi_kymp_content -- ***React:*** district-and-project-search +- **Module:** part of helfi_kymp_content +- **React:** district-and-project-search +- **ElasticSearch:** districts, districts_for_filters, projects, project_phases, project_themes and project_types indexes ##### How it works -Districts and subdistricts has been added via helfi_kymp_migrations module (module might have been removed) -Projects are created manually by content creators. -Searching for projects work as any other react search. +Districts and subdistricts have been added to the Drupal database via the [`helfi_kymp_migrations`](#helfi-kymp-migrations-helfi_kymp_migrations-module) +module. Projects are created manually by content creators. Searching for projects works like any other React search. -#### Journey planner (journey_planner) -An external tool by HSL which allows to find routes, for example [pyöräilyreittihaku](https://www.hel.fi/fi/kaupunkiymparisto-ja-liikenne/pyoraily/pyorareitit) +#### Journey Planner (journey_planner) +An embedded external tool by HSL allows users to find bike routes within the HSL area. ##### How it works -An iframe is added to the page which allows searching for routes. +The paragraph contains title and description fields, and includes an embedded iframe. This iframe is hardcoded into the +`hdbt_subtheme` [here](https://github.com/City-of-Helsinki/drupal-helfi-kymp/blob/dev/public/themes/custom/hdbt_subtheme/hdbt_subtheme.theme) +and is not configurable through the editor. The layout is constructed in the template using data provided by the +`hdbt_subtheme` preprocess hook. -#### Ploughing schedule (ploughing_schedule) +#### Ploughing Schedule (ploughing_schedule) The Ploughing Schedule paragraph is a tool that allows website users to get an estimated snow ploughing schedule for a specific street. From 0c6901ed430ed90df0621a9f170ea58037aa1c3c Mon Sep 17 00:00:00 2001 From: Tero Elonen Date: Wed, 31 Jul 2024 12:56:08 +0300 Subject: [PATCH 8/9] UHF-9642: Improved the documentation further --- README.md | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 73b5e7bd7..1736113e1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # City of Helsinki - KYMP Drupal project -KYMP, short for Kaupunkiympäristö ja liikenne, is a site that contains information about the city, its development, and -transportation. +KYMP, short for Kaupunkiympäristö ja liikenne, also formerly known only as Liikenne is a site that contains information +about the city, its development, and transportation. ## Environments Env | Branch | URL @@ -46,23 +46,24 @@ Modify the value of `COMPOSE_PROFILES` environment variable from `.env` file or ### Custom node types -#### Area (area) +#### District (district) A content type that includes a node for every district and subdistrict in Helsinki. The page layout closely follows the -standard page layout. Each area can be either a district or a subdistrict, depending on the contents of the +standard page layout. Each district can be either a main district or a subdistrict, depending on the contents of the Subdistricts (`field_subdistricts`) field on the node. The content was initially created automatically from Helsinki city districts and subdistricts and is manually adjusted over time. #### Project (project) -A custom content type for the KYMP instance, closely related to the [area](#area-area) content type. Each project is -associated with an area via the entity reference field Project District (field_project_district). Projects can be -categorized in various ways and follow a layout similar to the standard page. Projects can be searched using the [District and Project Search](#district-and-project-search-district_and_project_search). +A custom content type for the KYMP instance, closely related to the [district](#district-district) content type. Each +project is associated with an district via the entity reference field Project District (field_project_district). +Projects can be categorized in various ways and follow a layout similar to the standard page. Projects can be searched +using the [District and Project Search](#district-and-project-search-district_and_project_search). ### Custom blocks #### Subdistrict block -A block in the sidebar of pages with the content type [area](#area-area) lists subdistricts related to the viewed -district. The logic for this block is located in the custom module [`helfi_kymp_content`](https://github.com/City-of-Helsinki/drupal-helfi-kymp/tree/dev/public/modules/custom/helfi_kymp_content). +A block in the sidebar of pages with the content type [district](#district-district) lists subdistricts related to the +viewed district. The logic for this block is located in the custom module [`helfi_kymp_content`](https://github.com/City-of-Helsinki/drupal-helfi-kymp/tree/dev/public/modules/custom/helfi_kymp_content). - **Module:** part of helfi_kymp_content @@ -98,6 +99,15 @@ started the city districts were imported using [`helfi_kymp_migrations`](#helfi- Districts and subdistricts have been added to the Drupal database via the [`helfi_kymp_migrations`](#helfi-kymp-migrations-helfi_kymp_migrations-module) module. Projects are created manually by content creators. Searching for projects works like any other React search. +#### Project Listing (project-listing) +A Project List paragraph displays [Projects](#project-project) based on the referenced [District](#district-district) in +the Area field (`field_project_list_district`). To link the block to the [District and Project Search](#district-and-project-search-district_and_project_search), +add the Search Link Parameters (`field_search_link_parameters`). + +##### How it works +The paragraph uses a view called Project List (`project_list`)to filter desired projects based on the given contextual +filter, which is the District in this case. The paragraph also includes editable title and description fields. + #### Journey Planner (journey_planner) An embedded external tool by HSL allows users to find bike routes within the HSL area. From 5f568dd53c37f473815015ef4a244c684a43971f Mon Sep 17 00:00:00 2001 From: Tero Elonen Date: Wed, 31 Jul 2024 12:57:20 +0300 Subject: [PATCH 9/9] UHF-9642: Remove unused README file from helfi_kymp_plans module --- public/modules/custom/helfi_kymp_plans/README.md | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 public/modules/custom/helfi_kymp_plans/README.md diff --git a/public/modules/custom/helfi_kymp_plans/README.md b/public/modules/custom/helfi_kymp_plans/README.md deleted file mode 100644 index 1c0cfd065..000000000 --- a/public/modules/custom/helfi_kymp_plans/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Plans - Suunnitelmat -