From fdf6efafb222a3a7aca161ddb19090aa45f95396 Mon Sep 17 00:00:00 2001 From: JC Date: Mon, 2 Jan 2017 11:44:21 +0100 Subject: [PATCH] Display hist for pieces justificatives only if multiple files uploaded --- app/views/dossiers/_infos_dossier.html.haml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/dossiers/_infos_dossier.html.haml b/app/views/dossiers/_infos_dossier.html.haml index a7f5c8a09..82a417d18 100644 --- a/app/views/dossiers/_infos_dossier.html.haml +++ b/app/views/dossiers/_infos_dossier.html.haml @@ -95,8 +95,9 @@ %a{ href: "#{@pj.content_url}", target: '_blank' } Consulter %span{style:'margin-left:12px'} \- - = link_to "", class: "historique", "data-toggle" => "modal", "data-target" => "#PJmodal", :type => "button", "data-modal_title" => 'formulaires', "data-modal_index" => 'cerfa' do - %span.fa.fa-clock-o + - if @facade.dossier.pieces_justificatives.where(type_de_piece_justificative_id: type_de_piece_justificative.id).count > 1 + = link_to "", class: "historique", "data-toggle" => "modal", "data-target" => "#PJmodal", :type => "button", "data-modal_title" => 'formulaires', "data-modal_index" => 'cerfa' do + %span.fa.fa-clock-o - else = 'Pièce non fournie'