diff --git a/app/views/admin/procedures/_informations.html.haml b/app/views/admin/procedures/_informations.html.haml index 1fbd3f299..ad7076495 100644 --- a/app/views/admin/procedures/_informations.html.haml +++ b/app/views/admin/procedures/_informations.html.haml @@ -59,8 +59,8 @@ - else %a{ href: url_for(deliberation), target: '_blank' } = deliberation.filename.to_s - = link_to 'supprimer', delete_deliberation_admin_procedure_path(@procedure), - method: :delete + - if @procedure.persisted? + = link_to 'supprimer', delete_deliberation_admin_procedure_path(@procedure), method: :delete %br Modifier : = f.file_field :deliberation, @@ -75,9 +75,9 @@ - else %a{ href: url_for(notice), target: '_blank' } = notice.filename.to_s - \- - = link_to 'supprimer', delete_notice_admin_procedure_path(@procedure), - method: :delete + - if @procedure.persisted? + \- + = link_to 'supprimer', delete_notice_admin_procedure_path(@procedure), method: :delete %br Modifier : = f.file_field :notice, @@ -89,8 +89,9 @@ - if @procedure.logo.present? = image_tag @procedure.decorate.logo_img, { style: 'height: 40px; display: inline; margin-right: 6px;', id: 'preview_procedure_logo' } \- - = link_to 'supprimer', delete_logo_admin_procedure_path(@procedure), - method: :delete + + - if @procedure.persisted? + = link_to 'supprimer', delete_logo_admin_procedure_path(@procedure), method: :delete = f.file_field :logo, accept: 'image/png, image/jpg, image/jpeg', style: 'display: inline' %div{ style: 'margin-top: 5px;' }