Skip to content

Commit

Permalink
D8Core-7476: new field for site type
Browse files Browse the repository at this point in the history
  • Loading branch information
buttonwillowsix committed Sep 9, 2024
1 parent 4f8737d commit 604534f
Show file tree
Hide file tree
Showing 7 changed files with 165 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ dependencies:
- field.field.config_pages.stanford_basic_site_settings.su_site_owner_contact
- field.field.config_pages.stanford_basic_site_settings.su_site_renewal_due
- field.field.config_pages.stanford_basic_site_settings.su_site_tech_contact
- field.field.config_pages.stanford_basic_site_settings.su_site_type
- field.field.config_pages.stanford_basic_site_settings.su_site_url
module:
- change_labels
Expand Down Expand Up @@ -103,6 +104,7 @@ third_party_settings:
- su_site_tech_contact
- su_site_a11y_contact
- su_site_org
- su_site_type
label: 'Site Contacts'
region: content
parent_name: group_tabs
Expand Down Expand Up @@ -160,7 +162,7 @@ content:
third_party_settings: { }
su_hide_site_search:
type: boolean_checkbox
weight: 7
weight: 12
region: content
settings:
display_label: true
Expand Down Expand Up @@ -195,53 +197,53 @@ content:
third_party_settings: { }
su_site_algolia:
type: boolean_checkbox
weight: 9
weight: 14
region: content
settings:
display_label: true
third_party_settings: { }
su_site_algolia_file:
type: file_generic
weight: 15
weight: 20
region: content
settings:
progress_indicator: throbber
third_party_settings: { }
su_site_algolia_id:
type: string_textfield
weight: 11
weight: 16
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
su_site_algolia_index:
type: string_textfield
weight: 14
weight: 19
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
su_site_algolia_key:
type: string_textfield
weight: 12
weight: 17
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
su_site_algolia_search:
type: string_textfield
weight: 13
weight: 18
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
su_site_algolia_ui:
type: boolean_checkbox
weight: 10
weight: 15
region: content
settings:
display_label: true
Expand Down Expand Up @@ -308,7 +310,7 @@ content:
third_party_settings: { }
su_site_nobots:
type: boolean_checkbox
weight: 8
weight: 13
region: content
settings:
display_label: true
Expand Down Expand Up @@ -347,6 +349,12 @@ content:
placeholder: ''
size: 60
third_party_settings: { }
su_site_type:
type: options_select
weight: 8
region: content
settings: { }
third_party_settings: { }
su_site_url:
type: link_default
weight: 3
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
uuid: 92d83f14-f440-4b36-9307-280070c01934
langcode: en
status: true
dependencies:
config:
- taxonomy.vocabulary.site_type
module:
- path
- text
id: taxonomy_term.site_type.default
targetEntityType: taxonomy_term
bundle: site_type
mode: default
content:
description:
type: text_textfield
weight: 0
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
name:
type: string_textfield
weight: -5
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
path:
type: path
weight: 30
region: content
settings: { }
third_party_settings: { }
status:
type: boolean_checkbox
weight: 100
region: content
settings:
display_label: true
third_party_settings: { }
hidden:
publish_on: true
unpublish_on: true
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ dependencies:
- field.field.config_pages.stanford_basic_site_settings.su_site_algolia_index
- field.field.config_pages.stanford_basic_site_settings.su_site_algolia_key
- field.field.config_pages.stanford_basic_site_settings.su_site_algolia_search
- field.field.config_pages.stanford_basic_site_settings.su_site_algolia_ui
- field.field.config_pages.stanford_basic_site_settings.su_site_dropdowns
- field.field.config_pages.stanford_basic_site_settings.su_site_email
- field.field.config_pages.stanford_basic_site_settings.su_site_home
Expand All @@ -28,6 +29,7 @@ dependencies:
- field.field.config_pages.stanford_basic_site_settings.su_site_owner_contact
- field.field.config_pages.stanford_basic_site_settings.su_site_renewal_due
- field.field.config_pages.stanford_basic_site_settings.su_site_tech_contact
- field.field.config_pages.stanford_basic_site_settings.su_site_type
- field.field.config_pages.stanford_basic_site_settings.su_site_url
module:
- datetime
Expand Down Expand Up @@ -240,6 +242,14 @@ content:
third_party_settings: { }
weight: 16
region: content
su_site_type:
type: entity_reference_label
label: above
settings:
link: true
third_party_settings: { }
weight: 25
region: content
su_site_url:
type: link
label: above
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
uuid: 848ec136-e08f-4e62-a7a6-c427c9248333
langcode: en
status: true
dependencies:
config:
- config_pages.type.stanford_basic_site_settings
- field.storage.config_pages.su_site_type
- taxonomy.vocabulary.site_type
id: config_pages.stanford_basic_site_settings.su_site_type
field_name: su_site_type
entity_type: config_pages
bundle: stanford_basic_site_settings
label: 'Site Type'
description: 'What type of site is this? Choose the closest one. Used for reporting Stanford Sites use.'
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
handler: 'default:taxonomy_term'
handler_settings:
target_bundles:
site_type: site_type
sort:
field: name
direction: asc
auto_create: false
auto_create_bundle: ''
field_type: entity_reference
24 changes: 24 additions & 0 deletions config/sync/field.storage.config_pages.su_site_type.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
uuid: e2ca651d-d916-4266-be13-98ad00996fe8
langcode: en
status: true
dependencies:
module:
- config_pages
- field_permissions
- taxonomy
third_party_settings:
field_permissions:
permission_type: custom
id: config_pages.su_site_type
field_name: su_site_type
entity_type: config_pages
type: entity_reference
settings:
target_type: taxonomy_term
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
uuid: 3ce0f37c-3f7f-46be-89b4-c03a18327dd4
langcode: en
status: true
dependencies:
config:
- taxonomy.vocabulary.site_type
id: taxonomy_vocabulary_site_type
entity_type_id: taxonomy_vocabulary
entity_id: site_type
action: display_page
allow_override: 1
redirect: ''
redirect_code: 301
redirect_fallback_action: access_denied
25 changes: 25 additions & 0 deletions config/sync/taxonomy.vocabulary.site_type.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
uuid: 9813af0a-7d26-40c2-ad02-8d95b83c6ae2
langcode: en
status: true
dependencies:
module:
- scheduler
third_party_settings:
scheduler:
expand_fieldset: when_required
fields_display_mode: vertical_tab
publish_enable: false
publish_past_date: error
publish_past_date_created: false
publish_required: false
publish_revision: false
publish_touch: false
show_message_after_update: true
unpublish_enable: false
unpublish_required: false
unpublish_revision: false
name: 'Site Type'
vid: site_type
description: 'What kind of site is this?'
weight: 0
new_revision: false

0 comments on commit 604534f

Please sign in to comment.