From 0609fdee14f8ad2b974c9bf790530d92f6550b1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 29 Sep 2022 22:05:29 +0200 Subject: [PATCH] [workflow] Feature: allow user to retrieve the access link for the workflow + show dest email for a workflow --- CHANGELOG.md | 2 ++ .../views/Workflow/_decision.html.twig | 24 +++++++++++++++++++ .../views/Workflow/_history.html.twig | 9 +++++++ .../Authorization/EntityWorkflowVoter.php | 16 +++++++++++++ .../translations/messages.fr.yml | 6 ++++- 5 files changed, 56 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df4dab422..a438e9f09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ and this project adheres to * [activity][export] DX/Feature: use of an `ActivityTypeRepositoryInterface` instead of the old-style EntityRepository * [person][export] Fixed: some inconsistency with date filter on accompanying courses * [person][export] Fixed: use left join for related entities in accompanying course aggregators +* [workflow] Feature: allow user to copy and send manually the access link for the workflow +* [workflow] Feature: show the email addresses that received an access link for the workflow ## Test releases diff --git a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_decision.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_decision.html.twig index bb0411371..bd9274739 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_decision.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_decision.html.twig @@ -95,6 +95,15 @@ {% endif %} + {% if entity_workflow.currentStep.destEmail|length > 0 %} +

{{ 'workflow.An access key was also sent to those addresses'|trans }} :

+ + {% endif %} + {% if entity_workflow.currentStep.destUserByAccessKey|length > 0 %}

{{ 'workflow.Those users are also granted to apply a transition by using an access key'|trans }} :

{% endif %} + + {% if is_granted('CHILL_MAIN_WORKFLOW_LINK_SHOW', entity_workflow) %} +

{{ 'workflow.This link grant any user to apply a transition'|trans }} :

+ + {% set link = absolute_url(path('chill_main_workflow_grant_access_by_key', {'id': entity_workflow.currentStep.id, 'accessKey': entity_workflow.currentStep.accessKey})) %} +
+ + + + +
+ {% endif %} + + {% endif %} diff --git a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_history.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_history.html.twig index dda309da0..72aab397c 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_history.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_history.html.twig @@ -81,6 +81,15 @@ {% endif %} + {% if entity_workflow.currentStep.destEmail|length > 0 %} +

{{ 'workflow.An access key was also sent to those addresses'|trans }} :

+ + {% endif %} + {% if step.destUserByAccessKey|length > 0 %}

{{ 'workflow.Those users are also granted to apply a transition by using an access key'|trans }} :