From 09be2e1ec76cb932e3153608216e2283f27dd7cf Mon Sep 17 00:00:00 2001 From: bach Date: Thu, 9 Sep 2021 18:57:24 +0200 Subject: [PATCH] added conditionnal field to projets maps for title link or not regarding actif or not --- composer.json | 1 + composer.lock | 66 +++++- config/sync/core.extension.yml | 1 + config/sync/linkit.linkit_profile.default.yml | 2 +- config/sync/pagerer.preset.default.yml | 2 +- config/sync/views.view.projets.yml | 196 +++++++++++++++++- 6 files changed, 263 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 7c238cd1..6ac3c3a5 100644 --- a/composer.json +++ b/composer.json @@ -43,6 +43,7 @@ "drupal/structure_sync": "^2.0", "drupal/twig_xdebug": "^1.2", "drupal/video_embed_field": "^2.4", + "drupal/views_conditional": "^1.4", "geocoder-php/google-maps-provider": "^4.6", "geocoder-php/mapquest-provider": "^4.2", "wikimedia/composer-merge-plugin": "^2.0" diff --git a/composer.lock b/composer.lock index 4c12394b..e611d545 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "328b7f6a32c6d7ca83f1be7cf6b6435a", + "content-hash": "30be06897e716bde6a8c2d049891ae62", "packages": [ { "name": "ajgl/breakpoint-twig-extension", @@ -9476,6 +9476,70 @@ "docs": "https://www.drupal.org/docs/8/modules/views-bulk-operations-vbo" } }, + { + "name": "drupal/views_conditional", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/views_conditional.git", + "reference": "8.x-1.4" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/views_conditional-8.x-1.4.zip", + "reference": "8.x-1.4", + "shasum": "26aaf029801aaadf2a1a5781bcd9884887a2f575" + }, + "require": { + "drupal/core": "^8 || ^9" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "8.x-1.4", + "datestamp": "1619318541", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "Shelane French", + "homepage": "https://www.drupal.org/u/shelane", + "role": "Maintainer" + }, + { + "name": "Anand Toshniwal (anand.toshniwal93)", + "homepage": "https://www.drupal.org/u/anandtoshniwal93", + "role": "Maintainer" + }, + { + "name": "Timofey Denisov (ofry)", + "homepage": "https://www.drupal.org/u/ofry", + "role": "Maintainer" + }, + { + "name": "MChittenden", + "homepage": "https://www.drupal.org/u/mchittenden", + "role": "Maintainer" + } + ], + "description": "Views Conditional is a simple module that allows you to define conditionals with fields in views", + "homepage": "https://www.drupal.org/project/views_conditional", + "keywords": [ + "Drupal" + ], + "support": { + "source": "http://cgit.drupalcode.org/views_conditional", + "issues": "https://www.drupal.org/project/issues/views_conditional" + } + }, { "name": "drupal/views_ef_fieldset", "version": "1.5.0", diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index ef5675a2..b9e5bb76 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -138,6 +138,7 @@ module: video_embed_wysiwyg: 0 views_bulk_edit: 0 views_bulk_operations: 0 + views_conditional: 0 views_ef_fieldset: 0 views_ui: 0 extlink: 1 diff --git a/config/sync/linkit.linkit_profile.default.yml b/config/sync/linkit.linkit_profile.default.yml index d3448013..6fb68f39 100644 --- a/config/sync/linkit.linkit_profile.default.yml +++ b/config/sync/linkit.linkit_profile.default.yml @@ -7,7 +7,7 @@ dependencies: _core: default_config_hash: Tt8DtxZ3Nooo0PoWPpJvszA3R_5d8MmpUW7LM_R-BzY id: default -label: Default +label: Master description: 'A default Linkit profile' matchers: 556010a3-e317-48b3-b4ed-854c10f4b950: diff --git a/config/sync/pagerer.preset.default.yml b/config/sync/pagerer.preset.default.yml index 88fcf779..6337fef5 100644 --- a/config/sync/pagerer.preset.default.yml +++ b/config/sync/pagerer.preset.default.yml @@ -5,7 +5,7 @@ dependencies: { } _core: default_config_hash: iqELjKI7buiSyUfLs0cgSDbx7dvVI2StrGj0OaNLgSo id: default -label: Default +label: Master panes: left: style: none diff --git a/config/sync/views.view.projets.yml b/config/sync/views.view.projets.yml index bb9a436d..47aea7a9 100644 --- a/config/sync/views.view.projets.yml +++ b/config/sync/views.view.projets.yml @@ -3,6 +3,7 @@ langcode: fr status: true dependencies: config: + - field.storage.node.field_actif - field.storage.node.field_adresse - field.storage.node.field_ge - field.storage.node.field_programme @@ -13,6 +14,7 @@ dependencies: - leaflet_views - node - user + - views_conditional id: projets label: Projets module: views @@ -372,15 +374,80 @@ display: separator: ', ' field_api_classes: false plugin_id: field + field_actif: + id: field_actif + table: node__field_actif + field: field_actif + relationship: none + group_type: group + admin_label: '' + label: '' + exclude: true + 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: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: boolean + settings: + format: default + format_custom_true: '' + format_custom_false: '' + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + plugin_id: field title: id: title table: node_field_data field: title relationship: none group_type: group - admin_label: '' + admin_label: 'titre (lien)' label: '' - exclude: false + exclude: true alter: alter_text: false text: '' @@ -435,6 +502,128 @@ display: separator: ', ' field_api_classes: false plugin_id: field + title_1: + id: title_1 + table: node_field_data + field: title + relationship: none + group_type: group + admin_label: 'Titre (no-lien)' + label: '' + exclude: true + 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: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: string + settings: + link_to_entity: false + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + entity_type: node + entity_field: title + plugin_id: field + views_conditional_field: + id: views_conditional_field + table: views_conditional + field: views_conditional_field + relationship: none + group_type: group + admin_label: 'conditionnal title' + label: '' + 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: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + if: field_actif + condition: eq + equalto: '1' + then: '{{ title }}' + then_translate: 0 + or: '{{ title_1 }}' + or_translate: 0 + strip_tags: 0 + plugin_id: views_conditional_field field_programme: id: field_programme table: node__field_programme @@ -629,6 +818,7 @@ display: - 'user.node_grants:view' - user.permissions tags: + - 'config:field.storage.node.field_actif' - 'config:field.storage.node.field_adresse' - 'config:field.storage.node.field_ge' - 'config:field.storage.node.field_programme' @@ -665,6 +855,7 @@ display: - 'user.node_grants:view' - user.permissions tags: + - 'config:field.storage.node.field_actif' - 'config:field.storage.node.field_adresse' - 'config:field.storage.node.field_ge' - 'config:field.storage.node.field_programme' @@ -691,6 +882,7 @@ display: - 'user.node_grants:view' - user.permissions tags: + - 'config:field.storage.node.field_actif' - 'config:field.storage.node.field_adresse' - 'config:field.storage.node.field_ge' - 'config:field.storage.node.field_programme'