Skip to content

Commit

Permalink
Merge pull request #296 from UN-OCHA/berliner/HPC-9936
Browse files Browse the repository at this point in the history
HPC-9936: Revise entity browsers, also use them for story selection, don't link the tags, UI candy lik gin style status tags
  • Loading branch information
berliner authored Dec 12, 2024
2 parents 8159e60 + 5de77ee commit cd98911
Show file tree
Hide file tree
Showing 12 changed files with 2,737 additions and 21 deletions.
20 changes: 15 additions & 5 deletions config/core.entity_form_display.paragraph.story.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,32 @@ langcode: en
status: true
dependencies:
config:
- entity_browser.browser.story
- field.field.paragraph.story.field_story
- paragraphs.paragraphs_type.story
module:
- ncms_ui
id: paragraph.story.default
targetEntityType: paragraph
bundle: story
mode: default
content:
field_story:
type: entity_reference_autocomplete
type: entity_reference_browser_table_widget_ncms
weight: 0
region: content
settings:
match_operator: CONTAINS
match_limit: 10
size: 60
placeholder: ''
open: true
entity_browser: story
field_widget_display: label
field_widget_edit: '1'
field_widget_remove: '1'
field_widget_replace: '1'
selection_mode: selection_append
additional_fields:
options:
status: status
field_widget_display_settings: { }
third_party_settings: { }
status:
type: boolean_checkbox
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ content:
field_widget_display: label
field_widget_edit: '1'
field_widget_remove: '1'
field_widget_replace: '1'
selection_mode: selection_append
additional_fields:
options:
status: status
field_widget_replace: 0
field_widget_display_settings: { }
third_party_settings: { }
field_collapsible:
Expand Down
31 changes: 31 additions & 0 deletions config/entity_browser.browser.story.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
uuid: 53f92d65-5536-4418-b2cc-82bcde5fe33e
langcode: en
status: true
dependencies:
config:
- views.view.story_selection
module:
- views
name: story
label: Story
display: modal
display_configuration:
width: '1300'
height: ''
link_text: 'Add story'
auto_open: false
selection_display: no_display
selection_display_configuration: { }
widget_selector: single
widget_selector_configuration: { }
widgets:
724dbc5e-321d-48f7-9b00-845ca2c1705b:
id: view
uuid: 724dbc5e-321d-48f7-9b00-845ca2c1705b
label: 'Stories table'
weight: 1
settings:
submit_text: 'Add selected story'
auto_select: false
view: story_selection
view_display: entity_browser_table
11 changes: 10 additions & 1 deletion config/field.field.paragraph.story.field_story.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,21 @@ dependencies:
- field.storage.paragraph.field_story
- node.type.story
- paragraphs.paragraphs_type.story
module:
- field_config_cardinality
third_party_settings:
field_config_cardinality:
cardinality_config: '1'
cardinality_label_config: false
unlimited_not_required: ''
limited_not_required: ''
limited_required: ''
id: paragraph.story.field_story
field_name: field_story
entity_type: paragraph
bundle: story
label: Story
description: 'Type part of the title of the story to include.'
description: ''
required: true
translatable: true
default_value: { }
Expand Down
2 changes: 2 additions & 0 deletions config/user.role.administrator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ dependencies:
config:
- entity_browser.browser.article
- entity_browser.browser.articles
- entity_browser.browser.story
- filter.format.filtered_html
- filter.format.footnotes
- filter.format.limited_html
Expand Down Expand Up @@ -51,6 +52,7 @@ permissions:
- 'access media overview'
- 'access site in maintenance mode'
- 'access site reports'
- 'access story entity browser pages'
- 'access taxonomy overview'
- 'access toolbar'
- 'access user profiles'
Expand Down
2 changes: 2 additions & 0 deletions config/user.role.editor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ dependencies:
config:
- entity_browser.browser.article
- entity_browser.browser.articles
- entity_browser.browser.story
- filter.format.filtered_html
- media.type.author
- media.type.image
Expand Down Expand Up @@ -36,6 +37,7 @@ permissions:
- 'access articles entity browser pages'
- 'access content overview'
- 'access media overview'
- 'access story entity browser pages'
- 'access toolbar'
- 'add interactive content embed code'
- 'create article content'
Expand Down
2 changes: 1 addition & 1 deletion config/views.view.article_selection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,7 @@ display:
hide_alter_empty: true
type: separator
separator: ', '
link_to_taxonomy: true
link_to_taxonomy: false
limit: true
vids:
country: country
Expand Down
Loading

0 comments on commit cd98911

Please sign in to comment.