diff --git a/config/sync/views.view.programmes.yml b/config/sync/views.view.programmes.yml index 5918244c..09ae9ba5 100644 --- a/config/sync/views.view.programmes.yml +++ b/config/sync/views.view.programmes.yml @@ -547,8 +547,8 @@ display: element_wrapper_class: '' element_default_classes: true empty: '' - hide_empty: false - empty_zero: false + hide_empty: true + empty_zero: true hide_alter_empty: true entity_type: node plugin_id: views_computed_projets_reference @@ -597,8 +597,8 @@ display: element_wrapper_class: '' element_default_classes: true empty: '' - hide_empty: false - empty_zero: false + hide_empty: true + empty_zero: true hide_alter_empty: true entity_type: node plugin_id: views_computed_themes_reference diff --git a/web/modules/custom/popsu_programme/src/Plugin/views/field/ViewsComputedProjetsReference.php b/web/modules/custom/popsu_programme/src/Plugin/views/field/ViewsComputedProjetsReference.php index 19edecd5..9a4a396b 100644 --- a/web/modules/custom/popsu_programme/src/Plugin/views/field/ViewsComputedProjetsReference.php +++ b/web/modules/custom/popsu_programme/src/Plugin/views/field/ViewsComputedProjetsReference.php @@ -33,7 +33,7 @@ class ViewsComputedProjetsReference extends FieldPluginBase { $projets = $node->get('computed_projets_references')->getvalue(); } - return count($projets) . ' villes'; + return count($projets) ? count($projets) . ' villes' : null; } /** diff --git a/web/modules/custom/popsu_programme/src/Plugin/views/field/ViewsComputedThemesReference.php b/web/modules/custom/popsu_programme/src/Plugin/views/field/ViewsComputedThemesReference.php index 4cc1aea7..d96b1f53 100644 --- a/web/modules/custom/popsu_programme/src/Plugin/views/field/ViewsComputedThemesReference.php +++ b/web/modules/custom/popsu_programme/src/Plugin/views/field/ViewsComputedThemesReference.php @@ -33,7 +33,7 @@ class ViewsComputedThemesReference extends FieldPluginBase { $themes = $node->get('computed_themes_references')->getvalue(); } - return count($themes) . ' themes'; + return count($themes) ? count($themes) . ' thèmes' : null; } /**