demarches-normaliennes/app/views/administrateurs/procedures/_revision_changes.html.haml

14 lines
967 B
Text
Raw Normal View History

2022-10-19 09:28:23 +02:00
= render Dsfr::ListComponent.new do |list|
- list.with_empty do
= t(:no_changes, scope: [:administrateurs, :revision_changes])
= render partial: 'administrateurs/procedures/revision_change_attestation_template', collection: changes.filter { |change| change[:model] == :attestation_template }, as: :change, locals: { list: list }
= render partial: "administrateurs/procedures/revision_change_type_de_champ", collection: changes.filter { |change| change[:model] == :type_de_champ }, as: :change, locals: { list: list }
- move_changes, move_private_changes = changes.filter { |change| change[:op] == :move }.partition { |change| !change[:private] }
- if move_changes.present?
- list.with_item do
= t(:move, scope: [:administrateurs, :revision_changes], count: move_changes.size)
- if move_private_changes.present?
- list.with_item do
= t(:move_private, scope: [:administrateurs, :revision_changes], count: move_private_changes.size)