diff --git a/composer.lock b/composer.lock
index b0059d5d..507eb900 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4073,16 +4073,16 @@
},
{
"name": "drupal/hdbt",
- "version": "6.7.16",
+ "version": "6.7.18",
"source": {
"type": "git",
"url": "https://github.com/City-of-Helsinki/drupal-hdbt.git",
- "reference": "52d0f272cff444e5cdd2db2ccf7a660dce401849"
+ "reference": "643a333baebd357037bcacb7810d4a14dde39e4d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/City-of-Helsinki/drupal-hdbt/zipball/52d0f272cff444e5cdd2db2ccf7a660dce401849",
- "reference": "52d0f272cff444e5cdd2db2ccf7a660dce401849",
+ "url": "https://api.github.com/repos/City-of-Helsinki/drupal-hdbt/zipball/643a333baebd357037bcacb7810d4a14dde39e4d",
+ "reference": "643a333baebd357037bcacb7810d4a14dde39e4d",
"shasum": ""
},
"require": {
@@ -4101,10 +4101,10 @@
"Drupal"
],
"support": {
- "source": "https://github.com/City-of-Helsinki/drupal-hdbt/tree/6.7.16",
+ "source": "https://github.com/City-of-Helsinki/drupal-hdbt/tree/6.7.18",
"issues": "https://github.com/City-of-Helsinki/drupal-hdbt/issues"
},
- "time": "2024-10-21T15:06:33+00:00"
+ "time": "2024-10-22T12:59:01+00:00"
},
{
"name": "drupal/hdbt_admin",
@@ -4409,16 +4409,16 @@
},
{
"name": "drupal/helfi_platform_config",
- "version": "4.6.18",
+ "version": "4.6.19",
"source": {
"type": "git",
"url": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config.git",
- "reference": "55434c5d123a8381c366ad2df1bcff6f3140d92d"
+ "reference": "c17835fd4b1629ab55852a857320d6bd102b963d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/City-of-Helsinki/drupal-helfi-platform-config/zipball/55434c5d123a8381c366ad2df1bcff6f3140d92d",
- "reference": "55434c5d123a8381c366ad2df1bcff6f3140d92d",
+ "url": "https://api.github.com/repos/City-of-Helsinki/drupal-helfi-platform-config/zipball/c17835fd4b1629ab55852a857320d6bd102b963d",
+ "reference": "c17835fd4b1629ab55852a857320d6bd102b963d",
"shasum": ""
},
"require": {
@@ -4537,10 +4537,10 @@
],
"description": "HELfi platform config",
"support": {
- "source": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/tree/4.6.18",
+ "source": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/tree/4.6.19",
"issues": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/issues"
},
- "time": "2024-10-21T09:00:36+00:00"
+ "time": "2024-10-22T08:56:56+00:00"
},
{
"name": "drupal/helfi_proxy",
@@ -19560,6 +19560,6 @@
"ext-dom": "*",
"ext-libxml": "*"
},
- "platform-dev": [],
+ "platform-dev": {},
"plugin-api-version": "2.6.0"
}
diff --git a/conf/cmi/core.entity_form_display.paragraph.curated_event_list.default.yml b/conf/cmi/core.entity_form_display.paragraph.curated_event_list.default.yml
new file mode 100644
index 00000000..2514fff1
--- /dev/null
+++ b/conf/cmi/core.entity_form_display.paragraph.curated_event_list.default.yml
@@ -0,0 +1,38 @@
+uuid: b5c5ed81-d651-4db2-8d72-a67e7b66390e
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.field.paragraph.curated_event_list.field_all_events_link
+ - field.field.paragraph.curated_event_list.field_events
+ - paragraphs.paragraphs_type.curated_event_list
+ module:
+ - link
+_core:
+ default_config_hash: xbLWsjGFnK8aSW5O_r3mVF5bAlCp8J6wP5mGihlXLfU
+id: paragraph.curated_event_list.default
+targetEntityType: paragraph
+bundle: curated_event_list
+mode: default
+content:
+ field_all_events_link:
+ type: link_default
+ weight: 1
+ region: content
+ settings:
+ placeholder_url: ''
+ placeholder_title: ''
+ third_party_settings: { }
+ field_events:
+ type: entity_reference_autocomplete
+ weight: 0
+ region: content
+ settings:
+ match_operator: CONTAINS
+ match_limit: 5
+ size: 60
+ placeholder: ''
+ third_party_settings: { }
+hidden:
+ created: true
+ status: true
diff --git a/conf/cmi/core.entity_view_display.linkedevents_event.linkedevents_event.default.yml b/conf/cmi/core.entity_view_display.linkedevents_event.linkedevents_event.default.yml
new file mode 100644
index 00000000..78ab301e
--- /dev/null
+++ b/conf/cmi/core.entity_view_display.linkedevents_event.linkedevents_event.default.yml
@@ -0,0 +1,75 @@
+uuid: 22363443-8bc6-4b97-980f-6bfb225edb1b
+langcode: en
+status: true
+dependencies:
+ config:
+ - responsive_image.styles.card_teaser
+ module:
+ - datetime
+ - external_entities
+ - imagecache_external
+ - linkit
+_core:
+ default_config_hash: HLUzZHxqtb77OIc2B344fWXiNo5fO78woa0r4KmRGcA
+id: linkedevents_event.linkedevents_event.default
+targetEntityType: linkedevents_event
+bundle: linkedevents_event
+mode: default
+content:
+ end_time:
+ type: datetime_default
+ label: hidden
+ settings:
+ timezone_override: ''
+ format_type: medium
+ third_party_settings: { }
+ weight: 3
+ region: content
+ external_link:
+ type: linkit
+ label: hidden
+ settings:
+ trim_length: 80
+ url_only: false
+ url_plain: false
+ rel: ''
+ target: ''
+ linkit_profile: default
+ third_party_settings: { }
+ weight: 4
+ region: content
+ langcode:
+ type: string_default
+ label: hidden
+ settings: { }
+ third_party_settings: { }
+ weight: 5
+ region: content
+ main_image:
+ type: imagecache_external_responsive_image
+ label: hidden
+ settings:
+ imagecache_external_link: ''
+ imagecache_external_responsive_style: card_teaser
+ third_party_settings: { }
+ weight: 1
+ region: content
+ start_time:
+ type: datetime_default
+ label: hidden
+ settings:
+ timezone_override: ''
+ format_type: medium
+ third_party_settings: { }
+ weight: 2
+ region: content
+ 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/core.entity_view_display.paragraph.curated_event_list.default.yml b/conf/cmi/core.entity_view_display.paragraph.curated_event_list.default.yml
new file mode 100644
index 00000000..966ffdd4
--- /dev/null
+++ b/conf/cmi/core.entity_view_display.paragraph.curated_event_list.default.yml
@@ -0,0 +1,40 @@
+uuid: 313ec60d-d84a-4e82-9ae3-ee3221c0e631
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.field.paragraph.curated_event_list.field_all_events_link
+ - field.field.paragraph.curated_event_list.field_events
+ - paragraphs.paragraphs_type.curated_event_list
+ module:
+ - link
+_core:
+ default_config_hash: kSyBcsfddKV9vQJsToglwPaZvKFQSf3GDFPLqkzIfTQ
+id: paragraph.curated_event_list.default
+targetEntityType: paragraph
+bundle: curated_event_list
+mode: default
+content:
+ field_all_events_link:
+ type: link
+ label: hidden
+ settings:
+ trim_length: 80
+ url_only: false
+ url_plain: false
+ rel: ''
+ target: ''
+ third_party_settings: { }
+ weight: 1
+ region: content
+ field_events:
+ type: entity_reference_entity_view
+ label: hidden
+ settings:
+ view_mode: default
+ link: false
+ third_party_settings: { }
+ weight: 0
+ region: content
+hidden:
+ search_api_excerpt: true
diff --git a/conf/cmi/core.extension.yml b/conf/cmi/core.extension.yml
index 408cad44..25891215 100644
--- a/conf/cmi/core.extension.yml
+++ b/conf/cmi/core.extension.yml
@@ -67,6 +67,7 @@ module:
helfi_paragraphs_columns: 0
helfi_paragraphs_contact_card_listing: 0
helfi_paragraphs_content_cards: 0
+ helfi_paragraphs_curated_event_list: 0
helfi_paragraphs_hearings: 0
helfi_paragraphs_hero: 0
helfi_paragraphs_image: 0
diff --git a/conf/cmi/external_entities.external_entity_type.linkedevents_event.yml b/conf/cmi/external_entities.external_entity_type.linkedevents_event.yml
new file mode 100644
index 00000000..f263c518
--- /dev/null
+++ b/conf/cmi/external_entities.external_entity_type.linkedevents_event.yml
@@ -0,0 +1,38 @@
+uuid: 66fe8cbc-203c-40aa-ac7b-6e0e89470312
+langcode: en
+status: true
+dependencies: { }
+_core:
+ default_config_hash: Ll_0kw3O6gGsRvmdTi7l4K2pwhUrL0yQT4uPcttspmA
+id: linkedevents_event
+label: 'LinkedEvents: Event'
+label_plural: 'LinkedEvents: Events'
+description: 'Event entities from https://api.hel.fi/linkedevents.'
+generate_aliases: false
+read_only: true
+field_mapper_id: jsonpath
+field_mapper_config:
+ field_mappings:
+ id:
+ value: $.id
+ uuid:
+ value: $.id
+ title:
+ value: $.title
+ main_image:
+ uri: '$.images[0].url'
+ title: '$.images[0].alt_text'
+ start_time:
+ value: $.start_time
+ end_time:
+ value: $.end_time
+ external_link:
+ uri: $.external_link
+ title: $.clean_title
+storage_client_id: linkedevents_events
+storage_client_config: null
+persistent_cache_max_age: 0
+annotation_entity_type_id: null
+annotation_bundle_id: null
+annotation_field_name: null
+inherits_annotation_fields: false
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 18be99e9..8e3d8c07 100644
--- a/conf/cmi/field.field.node.landing_page.field_content.yml
+++ b/conf/cmi/field.field.node.landing_page.field_content.yml
@@ -9,6 +9,7 @@ dependencies:
- paragraphs.paragraphs_type.chart
- paragraphs.paragraphs_type.columns
- paragraphs.paragraphs_type.content_cards
+ - paragraphs.paragraphs_type.curated_event_list
- paragraphs.paragraphs_type.district_and_project_search
- paragraphs.paragraphs_type.event_list
- paragraphs.paragraphs_type.from_library
@@ -65,6 +66,7 @@ settings:
service_list_search: service_list_search
unit_search: unit_search
unit_contact_card: unit_contact_card
+ curated_event_list: curated_event_list
negate: 0
target_bundles_drag_drop:
banner:
@@ -79,6 +81,9 @@ settings:
content_cards:
weight: 1
enabled: true
+ curated_event_list:
+ weight: 15
+ enabled: true
district_and_project_search:
weight: 18
enabled: true
diff --git a/conf/cmi/field.field.paragraph.curated_event_list.field_all_events_link.yml b/conf/cmi/field.field.paragraph.curated_event_list.field_all_events_link.yml
new file mode 100644
index 00000000..78d0b935
--- /dev/null
+++ b/conf/cmi/field.field.paragraph.curated_event_list.field_all_events_link.yml
@@ -0,0 +1,30 @@
+uuid: b144b934-3c5a-4c5b-ae89-b477bfb8367d
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.paragraph.field_all_events_link
+ - paragraphs.paragraphs_type.curated_event_list
+ module:
+ - link
+_core:
+ default_config_hash: FfVydFQYnAcPJkSaTbBQoyzqe8k11WrSJ5tSxAt8b1k
+id: paragraph.curated_event_list.field_all_events_link
+field_name: field_all_events_link
+entity_type: paragraph
+bundle: curated_event_list
+label: 'All events link'
+description: "Add a link to the tapahtumat.hel.fi website. You may also filter the events in the event calendar as desired and copy the page's URL.\r\n
\r\nAlso provide a text for the link, eg. View all events."
+required: false
+translatable: false
+default_value:
+ -
+ attributes: { }
+ uri: 'https://tapahtumat.hel.fi'
+ title: 'View all events'
+ options: { }
+default_value_callback: ''
+settings:
+ title: 2
+ link_type: 16
+field_type: link
diff --git a/conf/cmi/field.field.paragraph.curated_event_list.field_events.yml b/conf/cmi/field.field.paragraph.curated_event_list.field_events.yml
new file mode 100644
index 00000000..896f3cde
--- /dev/null
+++ b/conf/cmi/field.field.paragraph.curated_event_list.field_events.yml
@@ -0,0 +1,28 @@
+uuid: 41acbd4d-63ba-4cb7-919c-d6435553d4a9
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.paragraph.field_events
+ - paragraphs.paragraphs_type.curated_event_list
+_core:
+ default_config_hash: XaOHQv-1E_t55GwYhhyvtA03_7mWbdEbmXA3YhGrHiA
+id: paragraph.curated_event_list.field_events
+field_name: field_events
+entity_type: paragraph
+bundle: curated_event_list
+label: Events
+description: "Pick events to display in the list. You may either search event by their name or enter their ID. \r\n
\r\nYou can find the ID of an event on tapahtumat.hel.fi site from the URL of the page. For example, in the url https://tapahtumat.hel.fi/fi/events/helsinki:agiy4m4ida the helsinki:agiy4m4ida part is the ID of the event.\r\n
\r\nThe page will display the top three events. You can arrange the events by dragging. Expired events will be automatically removed from the page."
+required: false
+translatable: false
+default_value: { }
+default_value_callback: ''
+settings:
+ handler: 'default:linkedevents_event'
+ handler_settings:
+ target_bundles: null
+ sort:
+ field: _none
+ direction: ASC
+ auto_create: false
+field_type: entity_reference
diff --git a/conf/cmi/field.storage.paragraph.field_all_events_link.yml b/conf/cmi/field.storage.paragraph.field_all_events_link.yml
new file mode 100644
index 00000000..046d3b06
--- /dev/null
+++ b/conf/cmi/field.storage.paragraph.field_all_events_link.yml
@@ -0,0 +1,21 @@
+uuid: 1dd4d7e6-e3be-490e-9309-e9380e0c33b4
+langcode: en
+status: true
+dependencies:
+ module:
+ - link
+ - paragraphs
+_core:
+ default_config_hash: 7QiTeiuYd-9Za2xvC3WVShDfIhAcgIpMYzIV4PX2NLQ
+id: paragraph.field_all_events_link
+field_name: field_all_events_link
+entity_type: paragraph
+type: link
+settings: { }
+module: link
+locked: false
+cardinality: 1
+translatable: true
+indexes: { }
+persist_with_no_fields: false
+custom_storage: false
diff --git a/conf/cmi/field.storage.paragraph.field_events.yml b/conf/cmi/field.storage.paragraph.field_events.yml
new file mode 100644
index 00000000..aff4e3ba
--- /dev/null
+++ b/conf/cmi/field.storage.paragraph.field_events.yml
@@ -0,0 +1,22 @@
+uuid: a381685c-627a-4ba4-8be3-5bb2d2a705bd
+langcode: en
+status: true
+dependencies:
+ module:
+ - external_entities
+ - paragraphs
+_core:
+ default_config_hash: 5xBhIfvn2RSNE7qg7Ep4BljIMo7j78jrEekdHV_eCgo
+id: paragraph.field_events
+field_name: field_events
+entity_type: paragraph
+type: entity_reference
+settings:
+ target_type: linkedevents_event
+module: core
+locked: false
+cardinality: -1
+translatable: true
+indexes: { }
+persist_with_no_fields: false
+custom_storage: false
diff --git a/conf/cmi/language/fi/field.field.paragraph.curated_event_list.field_all_events_link.yml b/conf/cmi/language/fi/field.field.paragraph.curated_event_list.field_all_events_link.yml
new file mode 100644
index 00000000..baa26279
--- /dev/null
+++ b/conf/cmi/language/fi/field.field.paragraph.curated_event_list.field_all_events_link.yml
@@ -0,0 +1,5 @@
+label: 'Kaikki tapahtumat -linkki'
+description: "Lisää likki tapahtumat.hel.fi -sivulle. Voit halutessasi tehdä tapahtumakalenterissa haluamasi tapahtumien rajauksen ja kopioida sivun URL-osoitteen.\r\nLisää myös teksti linkille, esimerkiksi. Katso kaikki tapahtumat"
+default_value:
+ -
+ title: 'Katso kaikki tapahtumat'
diff --git a/conf/cmi/language/fi/field.field.paragraph.curated_event_list.field_events.yml b/conf/cmi/language/fi/field.field.paragraph.curated_event_list.field_events.yml
new file mode 100644
index 00000000..65cac6a6
--- /dev/null
+++ b/conf/cmi/language/fi/field.field.paragraph.curated_event_list.field_events.yml
@@ -0,0 +1,2 @@
+label: Tapahtumat
+description: "Valitse tapahtumat, jotka näytetään listassa. Voit hakea tapahtumaa sen nimellä tai tapahtuman ID:llä.\r\n
\r\nLöydät tapahtuman ID:n tapahtumat.hel.fi-sivun osoitteesta: esimerkiksi osoitteessa https://tapahtumat.hel.fi/fi/events/helsinki:agiy4m4ida kohta helsinki:agiy4m4ida on tapahtuman ID.\r\n
\r\nSivulla näytetään kolme ylintä tapahtumaa. Voit järjestää tapahtumia raahaamalla. Vanhentuneet tapahtumat poistuvat sivulta automaattisesti."
diff --git a/conf/cmi/language/fi/paragraphs.paragraphs_type.curated_event_list.yml b/conf/cmi/language/fi/paragraphs.paragraphs_type.curated_event_list.yml
new file mode 100644
index 00000000..7d8f759d
--- /dev/null
+++ b/conf/cmi/language/fi/paragraphs.paragraphs_type.curated_event_list.yml
@@ -0,0 +1,2 @@
+label: 'Kuratoitu tapahtumalista'
+description: 'Manuaalisesti ylläpidettävä tapahtumalista tapahtumille Linked Events -rajapinnasta.'
diff --git a/conf/cmi/paragraphs.paragraphs_type.curated_event_list.yml b/conf/cmi/paragraphs.paragraphs_type.curated_event_list.yml
new file mode 100644
index 00000000..b729b022
--- /dev/null
+++ b/conf/cmi/paragraphs.paragraphs_type.curated_event_list.yml
@@ -0,0 +1,12 @@
+uuid: 5b0c689e-1733-47ff-ba7c-63923e4f2116
+langcode: en
+status: true
+dependencies: { }
+_core:
+ default_config_hash: OdlftsJm7cyT434X7pj43aSTgKo7t5f7eYxG3ShBimY
+id: curated_event_list
+label: 'Curated event list'
+icon_uuid: null
+icon_default: null
+description: 'Event list with curated event picks loaded from Linked Events API.'
+behavior_plugins: { }
diff --git a/tools/make/project/install.mk b/tools/make/project/install.mk
index fade4de0..483d64f7 100644
--- a/tools/make/project/install.mk
+++ b/tools/make/project/install.mk
@@ -3,7 +3,7 @@ ifeq ($(DRUPAL_CONF_EXISTS),yes)
else
DRUPAL_NEW_TARGETS := up build drush-si drush-helfi-enable-modules drush-locale-update drush-helfi-locale-import drush-unblock drush-uli
endif
-DRUPAL_POST_INSTALL_TARGETS := drush-locale-update drush-deploy drush-helfi-locale-import drush-unblock
+DRUPAL_POST_INSTALL_TARGETS := drush-deploy drush-locale-update drush-helfi-locale-import drush-unblock
OC_LOGIN_TOKEN ?= $(shell bash -c 'read -s -p "You must obtain an API token by visiting https://oauth-openshift.apps.arodevtest.hel.fi/oauth/token/request (Token):" token; echo $$token')