From 7f77b41fcc0fd111f1e7da5d558c1303b058a185 Mon Sep 17 00:00:00 2001 From: bach Date: Tue, 25 Jun 2024 11:12:13 +0200 Subject: [PATCH] =?UTF-8?q?ressources=20th=C3=A8mes=20and=20filters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ty_form_display.node.ressource.default.yml | 29 ++++- ...ty_view_display.node.ressource.default.yml | 15 ++- ...view_display.node.ressource.home_block.yml | 2 + ...ity_view_display.node.ressource.teaser.yml | 15 ++- ...ield.field.node.ressource.field_themes.yml | 29 +++++ .../sync/field.storage.node.field_themes.yml | 24 +++++ ...settings.taxonomy_term.theme_ressource.yml | 11 ++ .../taxonomy.vocabulary.theme_ressource.yml | 8 ++ config/sync/views.view.ressources.yml | 100 ++++++++++++++---- 9 files changed, 203 insertions(+), 30 deletions(-) create mode 100644 config/sync/field.field.node.ressource.field_themes.yml create mode 100644 config/sync/field.storage.node.field_themes.yml create mode 100644 config/sync/language.content_settings.taxonomy_term.theme_ressource.yml create mode 100644 config/sync/taxonomy.vocabulary.theme_ressource.yml diff --git a/config/sync/core.entity_form_display.node.ressource.default.yml b/config/sync/core.entity_form_display.node.ressource.default.yml index 07714ae..dae6bc5 100644 --- a/config/sync/core.entity_form_display.node.ressource.default.yml +++ b/config/sync/core.entity_form_display.node.ressource.default.yml @@ -10,6 +10,7 @@ dependencies: - field.field.node.ressource.field_liens - field.field.node.ressource.field_site - field.field.node.ressource.field_sous_titre + - field.field.node.ressource.field_themes - field.field.node.ressource.field_type_de_ressource - image.style.thumbnail - node.type.ressource @@ -25,8 +26,9 @@ third_party_settings: group_details: children: - field_site - - field_auteur - field_type_de_ressource + - field_themes + - field_auteur - status - promote label: Details @@ -111,7 +113,7 @@ content: third_party_settings: { } field_auteur: type: string_textfield - weight: 9 + weight: 11 region: content settings: size: 60 @@ -158,7 +160,7 @@ content: size: 60 placeholder: '' third_party_settings: { } - field_type_de_ressource: + field_themes: type: autocomplete_deluxe weight: 10 region: content @@ -175,16 +177,33 @@ content: new_terms: false no_empty_message: 'No terms could be found. Please type in order to add a new term.' third_party_settings: { } + field_type_de_ressource: + type: autocomplete_deluxe + weight: 9 + region: content + settings: + match_operator: CONTAINS + autocomplete_route_name: autocomplete_deluxe.autocomplete + size: 60 + selection_handler: default + limit: 10 + min_length: 0 + delimiter: '' + not_found_message_allow: false + not_found_message: "The term '@term' will be added" + new_terms: false + no_empty_message: 'No terms could be found. Please type in order to add a new term.' + third_party_settings: { } promote: type: boolean_checkbox - weight: 12 + weight: 13 region: content settings: display_label: true third_party_settings: { } status: type: boolean_checkbox - weight: 11 + weight: 12 region: content settings: display_label: true diff --git a/config/sync/core.entity_view_display.node.ressource.default.yml b/config/sync/core.entity_view_display.node.ressource.default.yml index d26f165..80504a4 100644 --- a/config/sync/core.entity_view_display.node.ressource.default.yml +++ b/config/sync/core.entity_view_display.node.ressource.default.yml @@ -10,6 +10,7 @@ dependencies: - field.field.node.ressource.field_liens - field.field.node.ressource.field_site - field.field.node.ressource.field_sous_titre + - field.field.node.ressource.field_themes - field.field.node.ressource.field_type_de_ressource - node.type.ressource module: @@ -28,7 +29,7 @@ content: label: visually_hidden settings: { } third_party_settings: { } - weight: 5 + weight: 6 region: content field_auteur: type: string @@ -44,7 +45,7 @@ content: settings: use_description_as_link_text: true third_party_settings: { } - weight: 6 + weight: 7 region: content field_image: type: image @@ -67,7 +68,7 @@ content: rel: '' target: '' third_party_settings: { } - weight: 7 + weight: 8 region: content field_site: type: entity_reference_label @@ -85,6 +86,14 @@ content: third_party_settings: { } weight: 2 region: content + field_themes: + type: entity_reference_label + label: visually_hidden + settings: + link: false + third_party_settings: { } + weight: 5 + region: content field_type_de_ressource: type: entity_reference_label label: visually_hidden diff --git a/config/sync/core.entity_view_display.node.ressource.home_block.yml b/config/sync/core.entity_view_display.node.ressource.home_block.yml index 8759932..72a7fcc 100644 --- a/config/sync/core.entity_view_display.node.ressource.home_block.yml +++ b/config/sync/core.entity_view_display.node.ressource.home_block.yml @@ -11,6 +11,7 @@ dependencies: - field.field.node.ressource.field_liens - field.field.node.ressource.field_site - field.field.node.ressource.field_sous_titre + - field.field.node.ressource.field_themes - field.field.node.ressource.field_type_de_ressource - node.type.ressource module: @@ -40,6 +41,7 @@ hidden: field_image: true field_liens: true field_site: true + field_themes: true field_type_de_ressource: true langcode: true search_api_excerpt: true diff --git a/config/sync/core.entity_view_display.node.ressource.teaser.yml b/config/sync/core.entity_view_display.node.ressource.teaser.yml index 864a4d3..85f317f 100644 --- a/config/sync/core.entity_view_display.node.ressource.teaser.yml +++ b/config/sync/core.entity_view_display.node.ressource.teaser.yml @@ -11,6 +11,7 @@ dependencies: - field.field.node.ressource.field_liens - field.field.node.ressource.field_site - field.field.node.ressource.field_sous_titre + - field.field.node.ressource.field_themes - field.field.node.ressource.field_type_de_ressource - image.style.large - node.type.ressource @@ -28,7 +29,7 @@ content: settings: link_to_entity: false third_party_settings: { } - weight: 3 + weight: 4 region: content field_image: type: image @@ -47,7 +48,7 @@ content: settings: link: true third_party_settings: { } - weight: 4 + weight: 5 region: content field_sous_titre: type: string @@ -57,6 +58,14 @@ content: third_party_settings: { } weight: 2 region: content + field_themes: + type: entity_reference_label + label: visually_hidden + settings: + link: false + third_party_settings: { } + weight: 3 + region: content field_type_de_ressource: type: entity_reference_label label: visually_hidden @@ -68,7 +77,7 @@ content: links: settings: { } third_party_settings: { } - weight: 5 + weight: 6 region: content hidden: body: true diff --git a/config/sync/field.field.node.ressource.field_themes.yml b/config/sync/field.field.node.ressource.field_themes.yml new file mode 100644 index 0000000..75e05d4 --- /dev/null +++ b/config/sync/field.field.node.ressource.field_themes.yml @@ -0,0 +1,29 @@ +uuid: 99a16ee1-b3da-4133-86bc-29ebea7c446b +langcode: fr +status: true +dependencies: + config: + - field.storage.node.field_themes + - node.type.ressource + - taxonomy.vocabulary.theme_ressource +id: node.ressource.field_themes +field_name: field_themes +entity_type: node +bundle: ressource +label: Thèmes +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: + theme_ressource: theme_ressource + sort: + field: name + direction: asc + auto_create: true + auto_create_bundle: '' +field_type: entity_reference diff --git a/config/sync/field.storage.node.field_themes.yml b/config/sync/field.storage.node.field_themes.yml new file mode 100644 index 0000000..1cc9158 --- /dev/null +++ b/config/sync/field.storage.node.field_themes.yml @@ -0,0 +1,24 @@ +uuid: 20a41f10-c80c-42c2-8d17-5b992548a95d +langcode: fr +status: true +dependencies: + module: + - field_permissions + - node + - taxonomy +third_party_settings: + field_permissions: + permission_type: public +id: node.field_themes +field_name: field_themes +entity_type: node +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 diff --git a/config/sync/language.content_settings.taxonomy_term.theme_ressource.yml b/config/sync/language.content_settings.taxonomy_term.theme_ressource.yml new file mode 100644 index 0000000..51781ac --- /dev/null +++ b/config/sync/language.content_settings.taxonomy_term.theme_ressource.yml @@ -0,0 +1,11 @@ +uuid: dd1fa500-b60f-4e93-a3aa-78c57570a8f6 +langcode: fr +status: true +dependencies: + config: + - taxonomy.vocabulary.theme_ressource +id: taxonomy_term.theme_ressource +target_entity_type_id: taxonomy_term +target_bundle: theme_ressource +default_langcode: site_default +language_alterable: false diff --git a/config/sync/taxonomy.vocabulary.theme_ressource.yml b/config/sync/taxonomy.vocabulary.theme_ressource.yml new file mode 100644 index 0000000..3c9fad6 --- /dev/null +++ b/config/sync/taxonomy.vocabulary.theme_ressource.yml @@ -0,0 +1,8 @@ +uuid: aa8b5627-2f03-4ef3-aae4-3c2010174700 +langcode: fr +status: true +dependencies: { } +name: 'Thème ressource' +vid: theme_ressource +description: '' +weight: 0 diff --git a/config/sync/views.view.ressources.yml b/config/sync/views.view.ressources.yml index 07f5618..3383b8f 100644 --- a/config/sync/views.view.ressources.yml +++ b/config/sync/views.view.ressources.yml @@ -6,6 +6,7 @@ dependencies: - core.entity_view_mode.node.teaser - node.type.ressource - system.menu.main + - taxonomy.vocabulary.theme_ressource - taxonomy.vocabulary.type_de_ressource module: - node @@ -96,7 +97,7 @@ display: type: basic options: submit_button: Appliquer - reset_button: false + reset_button: true reset_button_label: Réinitialiser exposed_sorts_label: 'Trier par' expose_sort_order: true @@ -149,30 +150,30 @@ display: plugin_id: bundle value: ressource: ressource - field_site_target_id: - id: field_site_target_id - table: node__field_site - field: field_site_target_id + group: 1 + title: + id: title + table: node_field_data + field: title relationship: none group_type: group admin_label: '' - plugin_id: numeric - operator: '=' - value: - min: '' - max: '' - value: '' + entity_type: node + entity_field: title + plugin_id: string + operator: contains + value: '' group: 1 exposed: true expose: - operator_id: field_site_target_id_op - label: Site + operator_id: title_op + label: Titre description: '' use_operator: false - operator: field_site_target_id_op + operator: title_op operator_limit_selection: false operator_list: { } - identifier: field_site_target_id + identifier: title required: false remember: false multiple: false @@ -182,8 +183,7 @@ display: admin: '0' root: '0' editor: '0' - min_placeholder: '' - max_placeholder: '' + collaborateur: '0' placeholder: '' is_grouped: false group_info: @@ -197,6 +197,63 @@ display: default_group: All default_group_multiple: { } group_items: { } + field_themes_target_id: + id: field_themes_target_id + table: node__field_themes + field: field_themes_target_id + relationship: none + group_type: group + admin_label: '' + plugin_id: taxonomy_index_tid + operator: or + value: { } + group: 1 + exposed: true + expose: + operator_id: field_themes_target_id_op + label: Thèmes + description: '' + use_operator: false + operator: field_themes_target_id_op + operator_limit_selection: false + operator_list: { } + identifier: field_themes_target_id + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + admin: '0' + root: '0' + editor: '0' + collaborateur: '0' + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + reduce_duplicates: false + vid: theme_ressource + type: select + hierarchy: false + limit: true + error_message: true + save_lineage: false + force_deepest: false + parent: null + level_labels: '' + hierarchy_depth: 0 + required_depth: 0 + none_label: '- Please select -' field_type_de_ressource_target_id: id: field_type_de_ressource_target_id table: node__field_type_de_ressource @@ -220,13 +277,14 @@ display: identifier: field_type_de_ressource_target_id required: false remember: false - multiple: true + multiple: false remember_roles: authenticated: authenticated anonymous: '0' admin: '0' root: '0' editor: '0' + collaborateur: '0' reduce: false is_grouped: false group_info: @@ -240,7 +298,7 @@ display: default_group: All default_group_multiple: { } group_items: { } - reduce_duplicates: true + reduce_duplicates: false vid: type_de_ressource type: select hierarchy: false @@ -253,6 +311,10 @@ display: hierarchy_depth: 0 required_depth: 0 none_label: '- Please select -' + filter_groups: + operator: AND + groups: + 1: AND style: type: default row: