From 321511929e925dbab3c4f8ae93e85c6264f75377 Mon Sep 17 00:00:00 2001 From: tnicolas1 Date: Thu, 21 Nov 2024 15:18:53 +0100 Subject: [PATCH] =?UTF-8?q?Correction=20de=20l'ann=C3=A9e=20scolaire=20pas?= =?UTF-8?q?s=C3=A9e=20en=20param=C3=A8tre=20pour=20la=20redirection=20vers?= =?UTF-8?q?=20une=20classe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/pfmps/_pfmp_student_table.html.haml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/views/pfmps/_pfmp_student_table.html.haml b/app/views/pfmps/_pfmp_student_table.html.haml index 4baf63a2a..780038805 100644 --- a/app/views/pfmps/_pfmp_student_table.html.haml +++ b/app/views/pfmps/_pfmp_student_table.html.haml @@ -1,9 +1,10 @@ - schoolings.sort_by{ |schooling| schooling.classe.school_year.start_year}.reverse.each do |schooling| - pfmps = schooling.pfmps - classe = schooling.classe + - school_year = classe.school_year %section.fr-my-6w %h2.fr-h4 - = link_to "#{classe.school_year} - #{classe.label} - #{classe.establishment}", school_year_class_path(selected_school_year, classe) + = link_to "#{school_year} - #{classe.label} - #{classe.establishment}", school_year_class_path(school_year, classe) = closed_schooling_information_tag(schooling, class: "fr-mb-2w") @@ -21,7 +22,7 @@ %tbody - pfmps.each do |pfmp| %tr - %td= link_to_if(classe.establishment.eql?(current_establishment), pfmp.listing_to_s.html_safe, school_year_class_schooling_pfmp_path(classe.school_year, classe, schooling, pfmp), title: "Voir la PFMP #{pfmp.full_dates}") + %td= link_to_if(classe.establishment.eql?(current_establishment), pfmp.listing_to_s.html_safe, school_year_class_schooling_pfmp_path(school_year, classe, schooling, pfmp), title: "Voir la PFMP #{pfmp.full_dates}") %td -if pfmp.latest_payment_request.present? = pfmp.latest_payment_request.status_badge @@ -32,10 +33,10 @@ - if classe.establishment.eql?(current_establishment) .actions .fr-btns-group.fr-btns-group--inline - = button_to "Ajouter une PFMP", new_school_year_class_schooling_pfmp_path(classe.school_year, classe, schooling), class: 'fr-btn', method: :get + = button_to "Ajouter une PFMP", new_school_year_class_schooling_pfmp_path(school_year, classe, schooling), class: 'fr-btn', method: :get - if schooling.attributive_decision.attached? = button_to "Télécharger la décision d'attribution", url_for(schooling.attributive_decision), class: 'fr-btn fr-btn--secondary', target: :download, method: :get - if schooling.abrogation_decision.attached? = button_to "Télécharger la décision d'abrogation", url_for(schooling.abrogation_decision), class: 'fr-btn fr-btn--secondary', target: :download, method: :get - if !@student.current_schooling.nil? && @student.current_schooling.eql?(schooling) && !schooling.removed? - = button_to "Retirer l'élève de la classe", confirm_removal_school_year_class_schooling_path(classe.school_year, classe, schooling), class: 'fr-btn fr-btn--danger', method: :get \ No newline at end of file + = button_to "Retirer l'élève de la classe", confirm_removal_school_year_class_schooling_path(school_year, classe, schooling), class: 'fr-btn fr-btn--danger', method: :get \ No newline at end of file