Skip to content

Commit

Permalink
Correction de l'année scolaire passée en paramètre pour la redirectio…
Browse files Browse the repository at this point in the history
…n vers une classe (#1231)
  • Loading branch information
tnicolas1 authored Nov 21, 2024
1 parent 4c15d86 commit 0643005
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/views/pfmps/_pfmp_student_table.html.haml
Original file line number Diff line number Diff line change
@@ -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")

Expand All @@ -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
Expand All @@ -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 [email protected]_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
= 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

0 comments on commit 0643005

Please sign in to comment.