generated from betagouv/rails-template
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correction de l'année scolaire passée en paramètre pour la redirectio…
…n vers une classe (#1231)
- Loading branch information
Showing
1 changed file
with
5 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") | ||
|
||
|
@@ -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 [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 |