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