Skip to content

Commit

Permalink
Merge pull request #642 from City-of-Helsinki/UHF-9708
Browse files Browse the repository at this point in the history
UHF-9708: Survey content type
  • Loading branch information
hyrsky authored Aug 12, 2024
2 parents 306601e + 8c73584 commit a49a104
Show file tree
Hide file tree
Showing 13 changed files with 408 additions and 8 deletions.
21 changes: 21 additions & 0 deletions conf/cmi/block.block.surveys.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
uuid: e44c3b61-6b9e-4731-9674-413f230e1710
langcode: en
status: true
dependencies:
module:
- helfi_etusivu_entities
theme:
- hdbt_subtheme
id: surveys
theme: hdbt_subtheme
region: before_content
weight: -15
provider: helfi_node_survey
plugin: surveys
settings:
id: surveys
label: Surveys
label_display: ''
provider: helfi_node_survey
use_remote_entities: true
visibility: { }
8 changes: 7 additions & 1 deletion conf/cmi/core.entity_form_display.node.survey.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,14 @@ content:
region: content
settings: { }
third_party_settings: { }
field_publish_externally:
type: boolean_checkbox
weight: 14
region: content
settings:
display_label: true
third_party_settings: { }
hidden:
field_publish_externally: true
hide_sidebar_navigation: true
promote: true
sticky: true
Expand Down
1 change: 1 addition & 0 deletions conf/cmi/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ module:
helfi_ckeditor: 0
helfi_etusivu: 0
helfi_etusivu_config: 0
helfi_etusivu_entities: 0
helfi_eu_cookie_compliance: 0
helfi_global_navigation: 0
helfi_image_styles: 0
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
uuid: 072df4c4-3de5-44f9-bd4f-c1d09006ce88
langcode: en
status: true
dependencies: { }
_core:
default_config_hash: klULx3zqlYgz7OOfeGsjBYHQmFp8V6_aMlFUYaOQRmA
id: helfi_announcements
label: 'Helfi: Announcements'
label_plural: 'Helfi: Announcements'
description: ''
generate_aliases: null
read_only: true
field_mapper_id: jsonpath
field_mapper_config:
field_mappings:
id:
value: $.id
uuid:
value: $.id
title:
value: '$.attributes["title"]'
published_at:
value: '$.attributes["published_at"]'
unpublish_on:
value: '$.attributes["unpublish_on"]'
notification:
value: '$.attributes["notification"]'
langcode:
value: '$.attributes["langcode"]'
body:
value: '$.attributes["body"]["value"]'
status:
value: '$.attributes["status"]'
announcement_type:
value: '$.attributes["field_announcement_type"]'
announcement_link_text:
value: '$.attributes["field_announcement_link"]["title"]'
announcement_link_url:
value: '$.attributes["field_announcement_link"]["uri"]'
announcement_assistive_technology_close_button_title:
value: '$.attributes["field_announcement_title"]'
storage_client_id: helfi_announcements
storage_client_config: { }
persistent_cache_max_age: -1
annotation_entity_type_id: null
annotation_bundle_id: null
annotation_field_name: null
inherits_annotation_fields: false
42 changes: 42 additions & 0 deletions conf/cmi/external_entities.external_entity_type.helfi_surveys.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
uuid: be631905-d77b-418a-890e-b04fa3ed3e22
langcode: en
status: true
dependencies: { }
_core:
default_config_hash: _EBh68cyUNEhZdqfsN5IEH5ieC-ND8JOMk5t_uhXdJc
id: helfi_surveys
label: 'Helfi: Survey'
label_plural: 'Helfi: Surveys'
description: ''
generate_aliases: null
read_only: true
field_mapper_id: jsonpath
field_mapper_config:
field_mappings:
id:
value: $.id
uuid:
value: $.id
title:
value: '$.attributes["title"]'
published_at:
value: '$.attributes["published_at"]'
unpublish_on:
value: '$.attributes["unpublish_on"]'
langcode:
value: '$.attributes["langcode"]'
body:
value: '$.attributes["body"]["value"]'
status:
value: '$.attributes["status"]'
survey_link_text:
value: '$.attributes["field_survey_link"]["title"]'
survey_link_url:
value: '$.attributes["field_survey_link"]["uri"]'
storage_client_id: helfi_surveys
storage_client_config: { }
persistent_cache_max_age: -1
annotation_entity_type_id: null
annotation_bundle_id: null
annotation_field_name: null
inherits_annotation_fields: false
215 changes: 215 additions & 0 deletions conf/cmi/jsonapi_extras.jsonapi_resource_config.node--survey.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
uuid: 1d49642a-fab8-4c74-ac95-ab4a509893db
langcode: en
status: true
dependencies:
config:
- node.type.survey
id: node--survey
disabled: false
path: node/survey
resourceType: node--survey
resourceFields:
nid:
disabled: false
fieldName: nid
publicName: nid
enhancer:
id: ''
uuid:
disabled: false
fieldName: uuid
publicName: uuid
enhancer:
id: ''
vid:
disabled: false
fieldName: vid
publicName: vid
enhancer:
id: ''
langcode:
disabled: false
fieldName: langcode
publicName: langcode
enhancer:
id: ''
type:
disabled: false
fieldName: type
publicName: type
enhancer:
id: ''
revision_timestamp:
disabled: false
fieldName: revision_timestamp
publicName: revision_timestamp
enhancer:
id: ''
revision_uid:
disabled: false
fieldName: revision_uid
publicName: revision_uid
enhancer:
id: ''
revision_log:
disabled: false
fieldName: revision_log
publicName: revision_log
enhancer:
id: ''
status:
disabled: false
fieldName: status
publicName: status
enhancer:
id: ''
uid:
disabled: false
fieldName: uid
publicName: uid
enhancer:
id: ''
title:
disabled: false
fieldName: title
publicName: title
enhancer:
id: ''
created:
disabled: false
fieldName: created
publicName: created
enhancer:
id: ''
changed:
disabled: false
fieldName: changed
publicName: changed
enhancer:
id: ''
promote:
disabled: false
fieldName: promote
publicName: promote
enhancer:
id: ''
sticky:
disabled: false
fieldName: sticky
publicName: sticky
enhancer:
id: ''
default_langcode:
disabled: false
fieldName: default_langcode
publicName: default_langcode
enhancer:
id: ''
revision_default:
disabled: false
fieldName: revision_default
publicName: revision_default
enhancer:
id: ''
revision_translation_affected:
disabled: false
fieldName: revision_translation_affected
publicName: revision_translation_affected
enhancer:
id: ''
color_palette:
disabled: false
fieldName: color_palette
publicName: color_palette
enhancer:
id: ''
hide_sidebar_navigation:
disabled: false
fieldName: hide_sidebar_navigation
publicName: hide_sidebar_navigation
enhancer:
id: ''
toc_enabled:
disabled: false
fieldName: toc_enabled
publicName: toc_enabled
enhancer:
id: ''
toc_title:
disabled: false
fieldName: toc_title
publicName: toc_title
enhancer:
id: ''
metatag:
disabled: false
fieldName: metatag
publicName: metatag
enhancer:
id: ''
path:
disabled: false
fieldName: path
publicName: path
enhancer:
id: ''
publish_on:
disabled: false
fieldName: publish_on
publicName: publish_on
enhancer:
id: ''
unpublish_on:
disabled: false
fieldName: unpublish_on
publicName: unpublish_on
enhancer:
id: ''
menu_link:
disabled: false
fieldName: menu_link
publicName: menu_link
enhancer:
id: ''
content_translation_source:
disabled: false
fieldName: content_translation_source
publicName: content_translation_source
enhancer:
id: ''
content_translation_outdated:
disabled: false
fieldName: content_translation_outdated
publicName: content_translation_outdated
enhancer:
id: ''
published_at:
disabled: false
fieldName: published_at
publicName: published_at
enhancer:
id: ''
body:
disabled: false
fieldName: body
publicName: body
enhancer:
id: ''
field_survey_all_pages:
disabled: false
fieldName: field_survey_all_pages
publicName: field_survey_all_pages
enhancer:
id: ''
field_survey_content_pages:
disabled: false
fieldName: field_survey_content_pages
publicName: field_survey_content_pages
enhancer:
id: ''
field_survey_link:
disabled: false
fieldName: field_survey_link
publicName: field_survey_link
enhancer:
id: ''
3 changes: 3 additions & 0 deletions conf/cmi/user.role.anonymous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies:
- rest.resource.helfi_menu_link_collection
module:
- eu_cookie_compliance
- external_entities
- helfi_api_base
- helfi_global_navigation
- media
Expand All @@ -28,5 +29,7 @@ permissions:
- 'restful get helfi_global_mobile_menu'
- 'restful get helfi_menu_link_collection'
- 'view global_menu'
- 'view helfi_announcements external entity'
- 'view helfi_surveys external entity'
- 'view media'
- 'view remote entities'
3 changes: 3 additions & 0 deletions conf/cmi/user.role.authenticated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies:
module:
- draggableviews
- eu_cookie_compliance
- external_entities
- file
- helfi_api_base
- helfi_global_navigation
Expand Down Expand Up @@ -38,6 +39,8 @@ permissions:
- 'restful get helfi_menu_link_collection'
- 'setup own tfa'
- 'view global_menu'
- 'view helfi_announcements external entity'
- 'view helfi_surveys external entity'
- 'view media'
- 'view remote entities'
- 'view unpublished paragraphs'
Loading

0 comments on commit a49a104

Please sign in to comment.