diff --git a/templates/back/signalement/view/visites/visites-buttons.html.twig b/templates/back/signalement/view/visites/visites-buttons.html.twig index ad789ee50..dcf2dde41 100755 --- a/templates/back/signalement/view/visites/visites-buttons.html.twig +++ b/templates/back/signalement/view/visites/visites-buttons.html.twig @@ -1,75 +1,72 @@ - -{% if signalement.interventions is not empty %} -
- {% if intervention.status is same as constant('App\\Entity\\Intervention::STATUS_PLANNED') %} - {% if is_granted('SIGN_EDIT_VISITE', intervention) %} - {% if workflow_can(intervention, 'cancel') %} - - {% endif %} - - {% if workflow_can(intervention, 'confirm') %} - - {% endif %} {% endif %} - {% elseif intervention.status is same as constant('App\\Entity\\Intervention::STATUS_DONE') %} - {% if signalement.interventions is empty or intervention.files is empty or intervention.getRapportDeVisite is empty %} - {% if is_granted('SIGN_EDIT_VISITE', intervention) %} - - {% endif %} - {% else %} - {% if is_granted('SIGN_EDIT_VISITE', intervention) %} - - {% endif %} - - Voir le rapport de visite - + + {% if workflow_can(intervention, 'confirm') %} + {% endif %} + {% endif %} + {% elseif intervention.status is same as constant('App\\Entity\\Intervention::STATUS_DONE') %} + {% if signalement.interventions is empty or intervention.files is empty or intervention.getRapportDeVisite is empty %} {% if is_granted('SIGN_EDIT_VISITE', intervention) %} {% endif %} - {% elseif intervention.status is same as constant('App\\Entity\\Intervention::STATUS_NOT_DONE') %} - {% if intervention.getRapportDeVisite is not empty %} - - Voir le rapport de visite - - {% endif %} {% else %} -   + {% if is_granted('SIGN_EDIT_VISITE', intervention) %} + + {% endif %} + + Voir le rapport de visite + + {% endif %} + {% if is_granted('SIGN_EDIT_VISITE', intervention) %} + + {% endif %} + {% elseif intervention.status is same as constant('App\\Entity\\Intervention::STATUS_NOT_DONE') %} + {% if intervention.getRapportDeVisite is not empty %} + + Voir le rapport de visite + {% endif %} -
-{% endif %} \ No newline at end of file + {% else %} +   + {% endif %} + \ No newline at end of file