diff --git a/src/Bundle/ChillMainBundle/Entity/SavedExport.php b/src/Bundle/ChillMainBundle/Entity/SavedExport.php index 08f866cb6..56143efdd 100644 --- a/src/Bundle/ChillMainBundle/Entity/SavedExport.php +++ b/src/Bundle/ChillMainBundle/Entity/SavedExport.php @@ -176,6 +176,14 @@ class SavedExport implements TrackCreationInterface, TrackUpdateInterface ]); } + /** + * Return true if shared with at least one user or one group + */ + public function isShared(): bool + { + return $this->sharedWithUsers->count() > 0 || $this->sharedWithGroups->count() > 0; + } + /** * Determines if the user is shared with either directly or through a group. * diff --git a/src/Bundle/ChillMainBundle/Resources/views/SavedExport/index.html.twig b/src/Bundle/ChillMainBundle/Resources/views/SavedExport/index.html.twig index 49bfda9e8..6ccadbcdf 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/SavedExport/index.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/SavedExport/index.html.twig @@ -30,6 +30,7 @@ {% if app.user is same as saved.user %}

{% if app.user is same as saved.user %}{{ 'saved_export.Owner'|trans }}{% endif %} + {% if saved.isShared() %}{{ 'saved_export.Shared with others'|trans }}{% endif %}

{% else %}

diff --git a/src/Bundle/ChillMainBundle/translations/messages.fr.yml b/src/Bundle/ChillMainBundle/translations/messages.fr.yml index 68878c45c..d3498cba9 100644 --- a/src/Bundle/ChillMainBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillMainBundle/translations/messages.fr.yml @@ -803,6 +803,7 @@ saved_export: execute: Générer Update existing: Mettre à jour le rapport enregistré existant Owner: Propriétaire + Shared with others: Partagé Save to new saved export: Créer un nouvel export enregistré Update current saved export: Modifier la configuration de l'export existant Duplicate: Dupliquer