From 672b5584e42ee91e0f3be82619a00c2c378a90ec Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Wed, 24 Jun 2020 19:07:23 +0200 Subject: [PATCH] suite --- .../admin/admin_spaces/_payments.html.haml | 8 +----- .../public/m_odr_files/_m_odr_file.html.haml | 27 ++++++++++++++++--- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/app/views/admin/admin_spaces/_payments.html.haml b/app/views/admin/admin_spaces/_payments.html.haml index 2a13cfc..ef971b0 100644 --- a/app/views/admin/admin_spaces/_payments.html.haml +++ b/app/views/admin/admin_spaces/_payments.html.haml @@ -1,11 +1,5 @@ - - - -%li= link_to "Ribs", admin_m_odr_rep_ribs_path - - %li= link_to "Factures", admin_m_odr_files_path - +%li= link_to "Ribs", admin_m_odr_rep_ribs_path %li= link_to "Primes", admin_m_odr_primes_path diff --git a/app/views/public/m_odr_files/_m_odr_file.html.haml b/app/views/public/m_odr_files/_m_odr_file.html.haml index 3b18d99..a131889 100644 --- a/app/views/public/m_odr_files/_m_odr_file.html.haml +++ b/app/views/public/m_odr_files/_m_odr_file.html.haml @@ -1,13 +1,32 @@ --m_odr_file.m_odr_file_roulages.each do |m_odr_file_roulage| - %tr#m_odr_file_row{:id => m_odr_file.id} +-if m_odr_file.m_odr_file_type_id == 1 + -m_odr_file.m_odr_file_roulages.each do |m_odr_file_roulage| + %tr#m_odr_file_row{:id => m_odr_file.id} + %td + =l m_odr_file_roulage.date, :format => :date if m_odr_file_roulage.date + + %td + =link_to ic(:download)+" Télécharger le document", download_admin_m_odr_file_path(m_odr_file, :disposition => "attachment") + + + %td.state + -if m_odr_file.admin_ok + =state_helper("Validé") + -elsif m_odr_file.admin_ok == false + =state_helper("Refusé") + -else + =state_helper("En cours de vérification") + +-else + %tr#m_odr_file_row{:id => m_odr_file.id} + %td - =l m_odr_file_roulage.date, :format => :date if m_odr_file_roulage.date + =l m_odr_file.created_at, :format => :date if m_odr_file.created_at %td =link_to ic(:download)+" Télécharger le document", download_admin_m_odr_file_path(m_odr_file, :disposition => "attachment") - + %td.state -if m_odr_file.admin_ok =state_helper("Validé")