From 3683a9b74677c6669da3c617d0268ae7b38af8a4 Mon Sep 17 00:00:00 2001 From: bach Date: Thu, 8 Sep 2022 10:54:20 +0200 Subject: [PATCH] #1878 #1879 better projects map: better popup, color change, link --- composer.json | 11 +- composer.lock | 60 ++++- config/sync/core.extension.yml | 1 + config/sync/image.style.map_popup.yml | 15 ++ config/sync/views.view.projets.yml | 347 +++++++++++++++++++++++++- web/profiles/d8-starterkit-profile | 2 +- 6 files changed, 426 insertions(+), 10 deletions(-) create mode 100644 config/sync/image.style.map_popup.yml diff --git a/composer.json b/composer.json index 14f9f67..45999c8 100644 --- a/composer.json +++ b/composer.json @@ -38,6 +38,7 @@ "drupal/paragraphs": "1.x-dev@dev", "drupal/role_delegation": "^1.1", "drupal/structure_sync": "^2.0", + "drupal/views_conditional": "^1.5", "drupal/webform": "^6.1", "geocoder-php/mapquest-provider": "^4.2", "wikimedia/composer-merge-plugin": "^2.0" @@ -48,7 +49,15 @@ "minimum-stability": "stable", "prefer-stable": true, "config": { - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "composer/installers": true, + "drupal/console-extend-plugin": true, + "cweagans/composer-patches": true, + "drupal/core-composer-scaffold": true, + "drupal/core-project-message": true, + "wikimedia/composer-merge-plugin": true + } }, "extra": { "drupal-scaffold": { diff --git a/composer.lock b/composer.lock index 23d1a52..eac0643 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": "3103e49e1d043d23aba96d4e19abe16d", + "content-hash": "2d02333ad4ccdbef0bb58f0885e81016", "packages": [ { "name": "alchemy/zippy", @@ -9081,6 +9081,62 @@ "docs": "https://www.drupal.org/docs/8/modules/views-bulk-operations-vbo" } }, + { + "name": "drupal/views_conditional", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/views_conditional.git", + "reference": "8.x-1.5" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/views_conditional-8.x-1.5.zip", + "reference": "8.x-1.5", + "shasum": "bb7d13abc0919e01933152002b0bf4189e5e2d1a" + }, + "require": { + "drupal/core": "^9 || ^10" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "8.x-1.5", + "datestamp": "1659989912", + "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": "anand.toshniwal93", + "homepage": "https://www.drupal.org/user/3345088" + }, + { + "name": "MChittenden", + "homepage": "https://www.drupal.org/user/2288348" + }, + { + "name": "ofry", + "homepage": "https://www.drupal.org/user/2740599" + }, + { + "name": "shelane", + "homepage": "https://www.drupal.org/user/2674989" + } + ], + "description": "Allows conditional views output.", + "homepage": "https://www.drupal.org/project/views_conditional", + "support": { + "source": "https://git.drupalcode.org/project/views_conditional" + } + }, { "name": "drupal/views_ef_fieldset", "version": "1.5.0", @@ -15342,5 +15398,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.3.0" } diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index 8789b50..b00072f 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -125,6 +125,7 @@ module: video_embed_field: 0 views_bulk_edit: 0 views_bulk_operations: 0 + views_conditional: 0 views_ef_fieldset: 0 views_ui: 0 webform: 0 diff --git a/config/sync/image.style.map_popup.yml b/config/sync/image.style.map_popup.yml new file mode 100644 index 0000000..95f419c --- /dev/null +++ b/config/sync/image.style.map_popup.yml @@ -0,0 +1,15 @@ +uuid: f0a4500a-b3f3-4da1-a74f-47f25c39b95a +langcode: fr +status: true +dependencies: { } +name: map_popup +label: 'map_popup (300x150)' +effects: + 8297794a-e2d8-4eb0-bab7-786baf07b014: + uuid: 8297794a-e2d8-4eb0-bab7-786baf07b014 + id: image_scale_and_crop + weight: 1 + data: + width: 300 + height: 150 + anchor: center-center diff --git a/config/sync/views.view.projets.yml b/config/sync/views.view.projets.yml index 34b68ba..cf43c83 100644 --- a/config/sync/views.view.projets.yml +++ b/config/sync/views.view.projets.yml @@ -5,14 +5,19 @@ dependencies: config: - core.entity_view_mode.node.teaser - field.storage.node.field_geofield + - field.storage.node.field_incube + - field.storage.node.field_photo + - image.style.map_popup - node.type.projet module: - better_exposed_filters - geofield + - image - leaflet_views - node - options - user + - views_conditional id: projets label: Projets module: views @@ -140,6 +145,11 @@ display: multi_type: separator separator: ', ' field_api_classes: false + field_incube: + id: field_incube + table: node__field_incube + field: field_incube + plugin_id: field pager: type: none options: @@ -513,6 +523,7 @@ display: - user.permissions tags: - 'config:field.storage.node.field_geofield' + - 'config:field.storage.node.field_incube' block_1: id: block_1 display_title: 'Projets Block' @@ -624,12 +635,329 @@ display: - user.permissions tags: - 'config:field.storage.node.field_geofield' + - 'config:field.storage.node.field_incube' block_2: id: block_2 display_title: 'Projets map' display_plugin: block position: 2 display_options: + fields: + field_photo: + id: field_photo + table: node__field_photo + field: field_photo + relationship: none + group_type: group + admin_label: '' + plugin_id: field + 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: target_id + type: image + settings: + image_link: content + image_style: map_popup + group_column: '' + 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 + title: + id: title + table: node_field_data + field: title + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: title + plugin_id: field + label: '' + exclude: false + alter: + alter_text: true + text: "{{ field_photo }}
\r\n{{ title }}" + 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: false + ellipsis: false + 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: true + 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 + field_geofield: + id: field_geofield + table: node__field_geofield + field: field_geofield + relationship: none + group_type: group + admin_label: '' + plugin_id: field + 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: geofield_default + settings: + output_format: wkt + output_escape: true + 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 + field_incube: + id: field_incube + table: node__field_incube + field: field_incube + relationship: none + group_type: group + admin_label: '' + plugin_id: field + 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_false: '' + format_custom_true: '' + 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 + views_conditional_field: + id: views_conditional_field + table: views_conditional + field: views_conditional_field + relationship: none + group_type: group + admin_label: '' + plugin_id: views_conditional_field + 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 + if: field_incube + condition: eq + equalto: Activé + then: red + then_translate: 0 + or: blue + or_translate: 0 + strip_tags: 0 filters: status: id: status @@ -668,7 +996,7 @@ display: data_source: field_geofield entity_source: __base_table name_field: title - description_field: '' + description_field: title view_mode: full leaflet_map: stamen-toner-lite height: '400' @@ -690,7 +1018,7 @@ display: zoomFiner: 0 weight: '' icon: - iconType: marker + iconType: circle_marker iconUrl: '' shadowUrl: '' className: '' @@ -709,9 +1037,9 @@ display: popupAnchor: x: '' 'y': '' - html: '
' + html: '
[node:field_map_marker:icon]
' html_class: leaflet-map-divicon - circle_marker_options: '{"radius":100,"color":"red","fillColor":"#f03","fillOpacity":0.5}' + circle_marker_options: '{"radius":5,"color":"{{ views_conditional_field }}","fillColor":"{{ views_conditional_field }}","fillOpacity":0.5}' fullscreen: control: false options: '{"position":"topleft","pseudoFullscreen":false}' @@ -731,12 +1059,16 @@ display: popup: false options: '' row: - type: 'entity:node' + type: fields options: - view_mode: teaser + default_field_elements: true + inline: { } + separator: '' + hide_empty: false defaults: style: false row: false + fields: false filters: false filter_groups: false display_description: '' @@ -752,6 +1084,8 @@ display: - user.permissions tags: - 'config:field.storage.node.field_geofield' + - 'config:field.storage.node.field_incube' + - 'config:field.storage.node.field_photo' block_3: id: block_3 display_title: 'Projets incubés Block' @@ -1091,3 +1425,4 @@ display: - user.permissions tags: - 'config:field.storage.node.field_geofield' + - 'config:field.storage.node.field_incube' diff --git a/web/profiles/d8-starterkit-profile b/web/profiles/d8-starterkit-profile index 6fe8986..6fb8027 160000 --- a/web/profiles/d8-starterkit-profile +++ b/web/profiles/d8-starterkit-profile @@ -1 +1 @@ -Subproject commit 6fe8986494069c7e9bf019cbe98d8f2c7d5166d0 +Subproject commit 6fb80278a224c3fe38d240c4237dc5f845bf0529