From 523df76ecb5ab641f607966930b21cfeb053fc98 Mon Sep 17 00:00:00 2001 From: Simon Lehericey Date: Fri, 16 Jun 2017 13:18:38 +0200 Subject: [PATCH] Attestation: fix attestation_template_admin_link --- ...left_panel_admin_procedurescontroller_navbar.html.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_navbar.html.haml b/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_navbar.html.haml index 94121e4cb..37e2fe106 100644 --- a/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_navbar.html.haml +++ b/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_navbar.html.haml @@ -45,12 +45,12 @@ .procedure-list-element{ class: ('active' if active == 'Prévisualisation') } Prévisualisation - - if @procedure.locked? - %a#onglet-attestation{ href: url_for(admin_procedure_attestation_template_path(@procedure, format: :pdf)), target: '_blank' } - .procedure-list-element{ class: ('active' if active == 'Attestation') } Attestation - - else + - if !@procedure.locked? %a#onglet-attestation{ href: url_for(edit_admin_procedure_attestation_template_path(@procedure)) } .procedure-list-element{ class: ('active' if active == 'Attestation') } Attestation + - elsif @procedure.attestation_template.present? + %a#onglet-attestation{ href: url_for(admin_procedure_attestation_template_path(@procedure, format: :pdf)), target: '_blank' } + .procedure-list-element Attestation .split-hr-left