Skip to content

Commit

Permalink
Merge pull request #186 from CuBoulder/issue/1398
Browse files Browse the repository at this point in the history
Person Page: Adds On / Off Toggle field
  • Loading branch information
jcsparks authored and web-flow committed Oct 30, 2024
2 parents 33a6802 + 4fb86d3 commit a56648e
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 8 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- ### Person Page: Adds On / Off Toggle field
Adds an on / off toggle field to make the Articles by Person block on a Person page optional.

Includes:
- theme => /~https://github.com/CuBoulder/tiamat-theme/pull/1437
- custom_entities => /~https://github.com/CuBoulder/tiamat-custom-entities/pull/186

Resolves /~https://github.com/CuBoulder/tiamat-theme/issues/1398
---

## [20241023] - 2024-10-23

- ### Updates article date/time formatting default option label
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ status: true
dependencies:
config:
- field.field.node.ucb_person.body
- field.field.node.ucb_person.field_ucb_articles_by_person
- field.field.node.ucb_person.field_ucb_person_address
- field.field.node.ucb_person.field_ucb_person_department
- field.field.node.ucb_person.field_ucb_person_email
Expand Down Expand Up @@ -120,14 +121,31 @@ third_party_settings:
formatter: closed
description: ''
required_fields: false
group_show_articles_person_side:
children:
- field_ucb_articles_by_person
label: 'Toggle Articles by Person'
region: content
parent_name: ''
weight: 6
format_type: details_sidebar
format_settings:
classes: ''
show_empty_fields: false
id: ''
label_as_html: false
open: false
description: ''
required_fields: true
weight: 0
id: node.ucb_person.default
targetEntityType: node
bundle: ucb_person
mode: default
content:
body:
type: text_textarea_with_summary
weight: 27
weight: 11
region: content
settings:
rows: 9
Expand All @@ -137,13 +155,20 @@ content:
third_party_settings: { }
created:
type: datetime_timestamp
weight: 6
weight: 7
region: content
settings: { }
third_party_settings: { }
field_ucb_articles_by_person:
type: boolean_checkbox
weight: 6
region: content
settings:
display_label: true
third_party_settings: { }
field_ucb_person_address:
type: text_textarea
weight: 12
weight: 15
region: content
settings:
rows: 4
Expand All @@ -161,7 +186,7 @@ content:
third_party_settings: { }
field_ucb_person_email:
type: email_default
weight: 8
weight: 11
region: content
settings:
placeholder: ''
Expand Down Expand Up @@ -225,23 +250,23 @@ content:
third_party_settings: { }
field_ucb_person_links:
type: link_default
weight: 11
weight: 14
region: content
settings:
placeholder_url: ''
placeholder_title: ''
third_party_settings: { }
field_ucb_person_office_hours:
type: text_textarea
weight: 13
weight: 16
region: content
settings:
rows: 5
placeholder: ''
third_party_settings: { }
field_ucb_person_phone:
type: telephone_default
weight: 9
weight: 12
region: content
settings:
placeholder: ''
Expand All @@ -255,7 +280,7 @@ content:
third_party_settings: { }
field_ucb_person_primary_link:
type: link_default
weight: 10
weight: 13
region: content
settings:
placeholder_url: ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ status: true
dependencies:
config:
- field.field.node.ucb_person.body
- field.field.node.ucb_person.field_ucb_articles_by_person
- field.field.node.ucb_person.field_ucb_person_address
- field.field.node.ucb_person.field_ucb_person_department
- field.field.node.ucb_person.field_ucb_person_email
Expand Down Expand Up @@ -37,6 +38,16 @@ content:
third_party_settings: { }
weight: 10
region: content
field_ucb_articles_by_person:
type: boolean
label: visually_hidden
settings:
format: boolean
format_custom_false: ''
format_custom_true: ''
third_party_settings: { }
weight: 19
region: content
field_ucb_person_address:
type: text_default
label: hidden
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dependencies:
config:
- core.entity_view_mode.node.teaser
- field.field.node.ucb_person.body
- field.field.node.ucb_person.field_ucb_articles_by_person
- field.field.node.ucb_person.field_ucb_person_address
- field.field.node.ucb_person.field_ucb_person_department
- field.field.node.ucb_person.field_ucb_person_email
Expand Down Expand Up @@ -43,6 +44,7 @@ content:
weight: 100
region: content
hidden:
field_ucb_articles_by_person: true
field_ucb_person_address: true
field_ucb_person_department: true
field_ucb_person_email: true
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_ucb_articles_by_person
- node.type.ucb_person
id: node.ucb_person.field_ucb_articles_by_person
field_name: field_ucb_articles_by_person
entity_type: node
bundle: ucb_person
label: 'Show Articles by Person'
description: "Show or hide the 'Articles by Person' block"
required: false
translatable: false
default_value:
-
value: 1
default_value_callback: ''
settings:
on_label: 'On'
off_label: 'Off'
field_type: boolean
17 changes: 17 additions & 0 deletions config/install/field.storage.node.field_ucb_articles_by_person.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
langcode: en
status: true
dependencies:
module:
- node
id: node.field_ucb_articles_by_person
field_name: field_ucb_articles_by_person
entity_type: node
type: boolean
settings: { }
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

0 comments on commit a56648e

Please sign in to comment.