diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepository.php index e28832bf9..0aaabd05f 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepository.php @@ -174,7 +174,10 @@ final class AccompanyingPeriodACLAwareRepository implements AccompanyingPeriodAC ->andWhere( $qb->expr()->orX( $qb->expr()->neq('ap.step', ':draft'), - $qb->expr()->eq('ap.createdBy', ':creator') + $qb->expr()->orX( + $qb->expr()->eq('ap.createdBy', ':creator'), + $qb->expr()->isNull('ap.createdBy') + ) ) ) ->setParameter('draft', AccompanyingPeriod::STEP_DRAFT) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/user_draft_periods_list.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/user_draft_periods_list.html.twig index d7bd8eea6..60f6ae9e0 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/user_draft_periods_list.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/user_draft_periods_list.html.twig @@ -22,6 +22,7 @@

{{ 'My accompanying periods in draft'|trans }}

+

{{ 'Display draft periods created by me'|trans }}

{% for period in accompanyingPeriods %} @@ -31,7 +32,9 @@ {% endfor %}
- {{ chill_pagination(pagination) }} + {% if accompanyingPeriods|length > 0 %} + {{ chill_pagination(pagination) }} + {% endif %}
diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 18e3ab13f..d33957ea7 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -966,6 +966,7 @@ Linked evaluations: Évaluations associées # Accompanying period per user My accompanying periods: Mes parcours My accompanying periods in draft: Mes parcours brouillons +Display draft periods created by me: Affiche les parcours en attente de confirmation. Ils ne sont visibles que par moi-même. Ces parcours restent disponibles 15 jours après leur création, avant d'être supprimés automatiquement. Number of periods: Nombre de parcours workflow: