Skip to content

Commit

Permalink
VOTE-2016 Add image field to state and voter guide content types (#747)
Browse files Browse the repository at this point in the history
  • Loading branch information
rayestrada authored Jun 10, 2024
1 parent b7f3bdf commit 3f25efb
Show file tree
Hide file tree
Showing 14 changed files with 150 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ dependencies:
- field.field.node.state_territory.field_mail_received_deadline
- field.field.node.state_territory.field_mail_registration_link
- field.field.node.state_territory.field_mailing_address_inst
- field.field.node.state_territory.field_media
- field.field.node.state_territory.field_metatags
- field.field.node.state_territory.field_more_info_link
- field.field.node.state_territory.field_nvrf_fields
Expand Down Expand Up @@ -47,6 +48,7 @@ dependencies:
- double_field
- field_group
- link
- media_library
- metatag
- text
- vote_nvrf
Expand Down Expand Up @@ -103,7 +105,7 @@ third_party_settings:
label: Tabs
region: content
parent_name: ''
weight: 1
weight: 2
format_type: tabs
format_settings:
classes: ''
Expand All @@ -119,6 +121,7 @@ third_party_settings:
- field_registration_type
- field_in_state_name
- field_of_state_name
- field_media
label: Overview
region: content
parent_name: group_form_tabs
Expand Down Expand Up @@ -200,7 +203,7 @@ mode: default
content:
created:
type: datetime_timestamp
weight: 3
weight: 4
region: content
settings: { }
third_party_settings: { }
Expand Down Expand Up @@ -344,9 +347,16 @@ content:
rows: 5
placeholder: ''
third_party_settings: { }
field_media:
type: media_library_widget
weight: 10
region: content
settings:
media_types: { }
third_party_settings: { }
field_metatags:
type: metatag_firehose
weight: 8
weight: 9
region: content
settings:
sidebar: true
Expand Down Expand Up @@ -499,26 +509,26 @@ content:
third_party_settings: { }
field_updated_date:
type: datetime_default
weight: 9
weight: 10
region: content
settings: { }
third_party_settings: { }
langcode:
type: language_select
weight: 7
weight: 8
region: content
settings:
include_locked: true
third_party_settings: { }
moderation_state:
type: moderation_state_default
weight: 5
weight: 6
region: content
settings: { }
third_party_settings: { }
status:
type: boolean_checkbox
weight: 6
weight: 7
region: content
settings:
display_label: true
Expand All @@ -533,7 +543,7 @@ content:
third_party_settings: { }
uid:
type: entity_reference_autocomplete
weight: 2
weight: 3
region: content
settings:
match_operator: CONTAINS
Expand All @@ -542,7 +552,7 @@ content:
placeholder: ''
third_party_settings: { }
url_redirects:
weight: 4
weight: 5
region: content
settings: { }
third_party_settings: { }
Expand Down
30 changes: 19 additions & 11 deletions config/sync/core.entity_form_display.node.voter_guide.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ dependencies:
- field.field.node.voter_guide.body
- field.field.node.voter_guide.field_basics_block
- field.field.node.voter_guide.field_icon
- field.field.node.voter_guide.field_media
- field.field.node.voter_guide.field_metatags
- field.field.node.voter_guide.field_subtitle
- node.type.voter_guide
Expand All @@ -24,7 +25,7 @@ mode: default
content:
body:
type: text_textarea_with_summary
weight: 2
weight: 3
region: content
settings:
rows: 9
Expand All @@ -34,13 +35,13 @@ content:
third_party_settings: { }
created:
type: datetime_timestamp
weight: 7
weight: 8
region: content
settings: { }
third_party_settings: { }
field_basics_block:
type: paragraphs
weight: 3
weight: 4
region: content
settings:
title: Paragraph
Expand All @@ -59,14 +60,21 @@ content:
third_party_settings: { }
field_icon:
type: media_library_widget
weight: 4
weight: 5
region: content
settings:
media_types: { }
third_party_settings: { }
field_media:
type: media_library_widget
weight: 2
region: content
settings:
media_types: { }
third_party_settings: { }
field_metatags:
type: metatag_firehose
weight: 8
weight: 9
region: content
settings:
sidebar: true
Expand All @@ -82,26 +90,26 @@ content:
third_party_settings: { }
langcode:
type: language_select
weight: 5
weight: 6
region: content
settings:
include_locked: true
third_party_settings: { }
moderation_state:
type: moderation_state_default
weight: 12
weight: 13
region: content
settings: { }
third_party_settings: { }
path:
type: path
weight: 9
weight: 10
region: content
settings: { }
third_party_settings: { }
status:
type: boolean_checkbox
weight: 11
weight: 12
region: content
settings:
display_label: true
Expand All @@ -116,7 +124,7 @@ content:
third_party_settings: { }
uid:
type: entity_reference_autocomplete
weight: 6
weight: 7
region: content
settings:
match_operator: CONTAINS
Expand All @@ -125,7 +133,7 @@ content:
placeholder: ''
third_party_settings: { }
url_redirects:
weight: 10
weight: 11
region: content
settings: { }
third_party_settings: { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ dependencies:
- field.field.node.state_territory.field_mail_received_deadline
- field.field.node.state_territory.field_mail_registration_link
- field.field.node.state_territory.field_mailing_address_inst
- field.field.node.state_territory.field_media
- field.field.node.state_territory.field_metatags
- field.field.node.state_territory.field_more_info_link
- field.field.node.state_territory.field_nvrf_fields
Expand Down Expand Up @@ -205,6 +206,15 @@ content:
third_party_settings: { }
weight: 27
region: content
field_media:
type: entity_reference_entity_view
label: hidden
settings:
view_mode: full
link: false
third_party_settings: { }
weight: 0
region: content
field_metatags:
type: metatag_empty_formatter
label: hidden
Expand Down
10 changes: 10 additions & 0 deletions config/sync/core.entity_view_display.node.state_territory.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ dependencies:
- field.field.node.state_territory.field_mail_received_deadline
- field.field.node.state_territory.field_mail_registration_link
- field.field.node.state_territory.field_mailing_address_inst
- field.field.node.state_territory.field_media
- field.field.node.state_territory.field_metatags
- field.field.node.state_territory.field_more_info_link
- field.field.node.state_territory.field_nvrf_fields
Expand Down Expand Up @@ -181,6 +182,15 @@ content:
third_party_settings: { }
weight: 10
region: content
field_media:
type: entity_reference_entity_view
label: hidden
settings:
view_mode: full
link: false
third_party_settings: { }
weight: 0
region: content
field_more_info_link:
type: link
label: hidden
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ dependencies:
- field.field.node.state_territory.field_mail_received_deadline
- field.field.node.state_territory.field_mail_registration_link
- field.field.node.state_territory.field_mailing_address_inst
- field.field.node.state_territory.field_media
- field.field.node.state_territory.field_metatags
- field.field.node.state_territory.field_more_info_link
- field.field.node.state_territory.field_nvrf_fields
Expand Down Expand Up @@ -76,6 +77,7 @@ hidden:
field_mail_received_deadline: true
field_mail_registration_link: true
field_mailing_address_inst: true
field_media: true
field_metatags: true
field_more_info_link: true
field_nvrf_fields: true
Expand Down
10 changes: 10 additions & 0 deletions config/sync/core.entity_view_display.node.voter_guide.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ dependencies:
- field.field.node.voter_guide.body
- field.field.node.voter_guide.field_basics_block
- field.field.node.voter_guide.field_icon
- field.field.node.voter_guide.field_media
- field.field.node.voter_guide.field_metatags
- field.field.node.voter_guide.field_subtitle
- node.type.voter_guide
Expand Down Expand Up @@ -49,6 +50,15 @@ content:
third_party_settings: { }
weight: 5
region: content
field_media:
type: entity_reference_entity_view
label: hidden
settings:
view_mode: full
link: false
third_party_settings: { }
weight: 0
region: content
field_metatags:
type: metatag_empty_formatter
label: above
Expand Down
13 changes: 13 additions & 0 deletions config/sync/core.entity_view_display.node.voter_guide.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ dependencies:
- field.field.node.voter_guide.body
- field.field.node.voter_guide.field_basics_block
- field.field.node.voter_guide.field_icon
- field.field.node.voter_guide.field_media
- field.field.node.voter_guide.field_metatags
- field.field.node.voter_guide.field_subtitle
- node.type.voter_guide
module:
- entity_reference_revisions
- media
- text
- user
id: node.voter_guide.full
Expand All @@ -35,6 +37,17 @@ content:
third_party_settings: { }
weight: 1
region: content
field_media:
type: media_thumbnail
label: above
settings:
image_link: ''
image_style: ''
image_loading:
attribute: lazy
third_party_settings: { }
weight: 2
region: content
hidden:
content_moderation_control: true
field_icon: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ dependencies:
- field.field.node.voter_guide.body
- field.field.node.voter_guide.field_basics_block
- field.field.node.voter_guide.field_icon
- field.field.node.voter_guide.field_media
- field.field.node.voter_guide.field_metatags
- field.field.node.voter_guide.field_subtitle
- node.type.voter_guide
Expand Down Expand Up @@ -38,6 +39,7 @@ content:
hidden:
content_moderation_control: true
field_basics_block: true
field_media: true
field_metatags: true
field_subtitle: true
langcode: true
Expand Down
2 changes: 1 addition & 1 deletion config/sync/field.field.node.page.field_media.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ id: node.page.field_media
field_name: field_media
entity_type: node
bundle: page
label: Media
label: Image
description: ''
required: false
translatable: false
Expand Down
29 changes: 29 additions & 0 deletions config/sync/field.field.node.state_territory.field_media.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
uuid: c4568bc6-4a51-4895-a748-60de311a3c85
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_media
- media.type.image
- node.type.state_territory
id: node.state_territory.field_media
field_name: field_media
entity_type: node
bundle: state_territory
label: Image
description: ''
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings:
handler: 'default:media'
handler_settings:
target_bundles:
image: image
sort:
field: _none
direction: ASC
auto_create: false
auto_create_bundle: ''
field_type: entity_reference
Loading

0 comments on commit 3f25efb

Please sign in to comment.