fixed inline editing views admin conflict btw filters an save button
This commit is contained in:
@@ -11,7 +11,7 @@ _core:
|
||||
id: gin_breadcrumbs
|
||||
theme: gin
|
||||
region: breadcrumb
|
||||
weight: 0
|
||||
weight: -4
|
||||
provider: null
|
||||
plugin: system_breadcrumb_block
|
||||
settings:
|
||||
|
||||
@@ -11,7 +11,7 @@ _core:
|
||||
id: gin_content
|
||||
theme: gin
|
||||
region: content
|
||||
weight: 0
|
||||
weight: -2
|
||||
provider: null
|
||||
plugin: system_main_block
|
||||
settings:
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
uuid: fcf84dcc-5527-4f4c-86f2-f03cf13f8314
|
||||
langcode: fr
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- views.view.content
|
||||
module:
|
||||
- system
|
||||
- views
|
||||
theme:
|
||||
- gin
|
||||
id: gin_formulaireexposecontentpage_1
|
||||
theme: gin
|
||||
region: content
|
||||
weight: -3
|
||||
provider: null
|
||||
plugin: 'views_exposed_filter_block:content-page_1'
|
||||
settings:
|
||||
id: 'views_exposed_filter_block:content-page_1'
|
||||
label: ''
|
||||
label_display: '0'
|
||||
provider: views
|
||||
views_label: ''
|
||||
visibility:
|
||||
request_path:
|
||||
id: request_path
|
||||
negate: false
|
||||
pages: "/admin/content\r\n/admin/content/*"
|
||||
@@ -9,7 +9,7 @@ _core:
|
||||
id: gin_local_actions
|
||||
theme: gin
|
||||
region: content
|
||||
weight: -10
|
||||
weight: -4
|
||||
provider: null
|
||||
plugin: local_actions_block
|
||||
settings:
|
||||
|
||||
@@ -9,7 +9,7 @@ _core:
|
||||
id: gin_page_title
|
||||
theme: gin
|
||||
region: header
|
||||
weight: -30
|
||||
weight: -5
|
||||
provider: null
|
||||
plugin: page_title_block
|
||||
settings:
|
||||
|
||||
@@ -9,7 +9,7 @@ _core:
|
||||
id: gin_primary_local_tasks
|
||||
theme: gin
|
||||
region: header
|
||||
weight: 0
|
||||
weight: -4
|
||||
provider: null
|
||||
plugin: local_tasks_block
|
||||
settings:
|
||||
|
||||
@@ -9,7 +9,7 @@ _core:
|
||||
id: gin_secondary_local_tasks
|
||||
theme: gin
|
||||
region: pre_content
|
||||
weight: 0
|
||||
weight: -5
|
||||
provider: null
|
||||
plugin: local_tasks_block
|
||||
settings:
|
||||
|
||||
@@ -50,6 +50,7 @@ module:
|
||||
filter: 0
|
||||
filter_perms: 0
|
||||
formatter_suite: 0
|
||||
gin_compat: 0
|
||||
gin_toolbar: 0
|
||||
help: 0
|
||||
honeypot: 0
|
||||
|
||||
@@ -4,8 +4,6 @@ status: true
|
||||
dependencies:
|
||||
config:
|
||||
- core.base_field_override.node.evenement.promote
|
||||
- field.field.node.evenement.field_type_d_evenement
|
||||
- field.field.node.projet.field_type_de_projet
|
||||
- field.storage.node.field_dates
|
||||
- field.storage.node.field_images
|
||||
- field.storage.node.field_projet_s_lie_s
|
||||
@@ -242,7 +240,7 @@ display:
|
||||
admin_label: ''
|
||||
plugin_id: field
|
||||
label: 'Type de projet / évenement'
|
||||
exclude: true
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
@@ -305,7 +303,7 @@ display:
|
||||
admin_label: ''
|
||||
plugin_id: field
|
||||
label: "Type d'évenement"
|
||||
exclude: true
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
@@ -359,136 +357,6 @@ display:
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
form_field_field_type_de_projet:
|
||||
id: form_field_field_type_de_projet
|
||||
table: node_field_data
|
||||
field: form_field_field_type_de_projet
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
entity_type: node
|
||||
plugin_id: entity_form_field
|
||||
label: 'Type de projet / évenement'
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
plugin:
|
||||
hide_title: true
|
||||
hide_description: true
|
||||
fallback_view_mode: '0'
|
||||
type: autocomplete_deluxe
|
||||
settings:
|
||||
match_operator: CONTAINS
|
||||
match_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: "Pour qu'un projet puisse apparaître sur la home, il doit obligatoirement avoir un type de projet."
|
||||
third_party_settings: { }
|
||||
form_field_field_type_d_evenement:
|
||||
id: form_field_field_type_d_evenement
|
||||
table: node_field_data
|
||||
field: form_field_field_type_d_evenement
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
entity_type: node
|
||||
plugin_id: entity_form_field
|
||||
label: "Form field: Type d'évenement"
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
plugin:
|
||||
hide_title: true
|
||||
hide_description: true
|
||||
fallback_view_mode: '0'
|
||||
type: autocomplete_deluxe
|
||||
settings:
|
||||
match_operator: CONTAINS
|
||||
match_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: "Pour qu'un événement puisse apparaître sur la home, il doit obligatoirement avoir un type d'événement."
|
||||
third_party_settings: { }
|
||||
field_projet_s_lie_s:
|
||||
id: field_projet_s_lie_s
|
||||
table: node__field_projet_s_lie_s
|
||||
@@ -1392,8 +1260,6 @@ display:
|
||||
- user.permissions
|
||||
tags:
|
||||
- 'config:core.base_field_override.node.evenement.promote'
|
||||
- 'config:field.field.node.evenement.field_type_d_evenement'
|
||||
- 'config:field.field.node.projet.field_type_de_projet'
|
||||
- 'config:field.storage.node.field_dates'
|
||||
- 'config:field.storage.node.field_images'
|
||||
- 'config:field.storage.node.field_projet_s_lie_s'
|
||||
@@ -1406,6 +1272,7 @@ display:
|
||||
display_plugin: page
|
||||
position: 1
|
||||
display_options:
|
||||
exposed_block: true
|
||||
display_extenders: { }
|
||||
path: admin/content/node
|
||||
menu:
|
||||
@@ -1433,8 +1300,6 @@ display:
|
||||
- user.permissions
|
||||
tags:
|
||||
- 'config:core.base_field_override.node.evenement.promote'
|
||||
- 'config:field.field.node.evenement.field_type_d_evenement'
|
||||
- 'config:field.field.node.projet.field_type_de_projet'
|
||||
- 'config:field.storage.node.field_dates'
|
||||
- 'config:field.storage.node.field_images'
|
||||
- 'config:field.storage.node.field_projet_s_lie_s'
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* gin_compat_preprocess_block() ajoute la classe "views-exposed-form" au
|
||||
* <form> pour que Claro/Gin lui appliquent nativement leur mise en page
|
||||
* flex (voir claro/css/components/views-exposed-form.css). Mais le wrapper
|
||||
* du bloc porte déjà cette même classe de façon native (indépendamment de
|
||||
* nous), donc la règle Claro/Gin "card" (padding, marge, bordure, ombre)
|
||||
* s'applique aux deux éléments imbriqués et double l'espace utilisé. On ne
|
||||
* neutralise ici que le wrapper, pour qu'une seule "card" (celle du
|
||||
* <form>) reste visible — le style visuel proprement dit reste 100% celui
|
||||
* de Gin, on ne fait que retirer la duplication.
|
||||
*/
|
||||
.views-exposed-form.block {
|
||||
padding: 0 !important;
|
||||
margin: 0 0 var(--gin-spacing-l, 24px) !important;
|
||||
border: 0 !important;
|
||||
background: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.views-exposed-form.block form.views-exposed-form{
|
||||
margin: 0!important;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
type: module
|
||||
name: 'Gin Compat'
|
||||
description: 'Correctifs de compatibilité CSS/JS pour le thème d''administration Gin (éléments Views/Better Exposed Filters rendus hors du contexte habituel de la vue, ex. bloc de filtres exposés).'
|
||||
package: Gin
|
||||
core_version_requirement: '^10.5 || ^11'
|
||||
@@ -0,0 +1,4 @@
|
||||
exposed-filters-block:
|
||||
css:
|
||||
theme:
|
||||
css/exposed-filters-block.css: {}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Correctifs de compatibilité pour le thème d'administration Gin.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_preprocess_block().
|
||||
*
|
||||
* Un formulaire de filtres exposés placé en bloc autonome (Views > "Exposed
|
||||
* form in block") perd la classe "views-exposed-form" sur sa balise <form> :
|
||||
* Drupal core (BlockViewBuilder::preRender()) retire volontairement
|
||||
* #attributes du contenu d'un bloc pour le fusionner dans le wrapper du
|
||||
* bloc, donc tout ce qu'on ajoute via hook_form_alter atterrit sur le <div>
|
||||
* englobant plutôt que sur le <form>. Or c'est justement cette classe que
|
||||
* Claro/Gin ciblent nativement pour la mise en page flex (voir
|
||||
* claro/css/components/views-exposed-form.css). On la réinjecte donc ici,
|
||||
* après ce "vol" d'attributs, directement sur le contenu du bloc afin
|
||||
* qu'elle atterrisse sur le <form> lors de son propre rendu.
|
||||
*/
|
||||
function gin_compat_preprocess_block(array &$variables) {
|
||||
$plugin_id = $variables['plugin_id'] ?? '';
|
||||
if (str_starts_with($plugin_id, 'views_exposed_filter_block:')) {
|
||||
$variables['content']['#attributes']['class'][] = 'views-exposed-form';
|
||||
// Le wrapper du bloc porte nativement cette même classe : neutralise sa
|
||||
// "card" (padding/marge/bordure/ombre) pour éviter qu'elle se double
|
||||
// avec celle du <form>. Voir css/exposed-filters-block.css.
|
||||
$variables['content']['#attached']['library'][] = 'gin_compat/exposed-filters-block';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user