Show separate blocks for types de champ and annotation changes
This commit is contained in:
parent
19195008e8
commit
35eccb5630
6 changed files with 73 additions and 19 deletions
|
@ -30,5 +30,6 @@
|
|||
%li= "Valeurs ajoutés : #{added.map{ |term| "« #{term.strip} »" }.join(", ")}."
|
||||
- if removed.present?
|
||||
%li= "Valeurs supprimés : #{removed.map{ |term| "« #{term.strip} »" }.join(", ")}."
|
||||
- if changes.any? { |change| change[:op] == :move }
|
||||
%li.mb-1 Des champs ont changé de position
|
||||
- move_changes = changes.filter { |change| change[:op] == :move }.size
|
||||
- if move_changes != 0
|
||||
%li.mb-1= t(:has_move_changes, count: move_changes, scope: [:new_administrateur, :revision_changes])
|
||||
|
|
|
@ -33,11 +33,22 @@
|
|||
= link_to 'Publier les modifications', admin_procedure_publication_path(@procedure), class: 'button primary', id: 'publish-procedure-link', data: { disable_with: "Publication..." }
|
||||
|
||||
- if @procedure.draft_changed?
|
||||
.container
|
||||
.card.featured
|
||||
.card-title
|
||||
Des champs ont été changés
|
||||
= render partial: 'revision_changes', locals: { changes: @procedure.revision_changes }
|
||||
- types_de_champ_changes = @procedure.revision_types_de_champ_changes
|
||||
- types_de_champ_private_changes = @procedure.revision_types_de_champ_private_changes
|
||||
|
||||
- if types_de_champ_changes.present?
|
||||
.container
|
||||
.card.featured
|
||||
.card-title
|
||||
= t(:has_changes, count: types_de_champ_changes.size, scope: [:new_administrateur, :revision_changes])
|
||||
= render partial: 'revision_changes', locals: { changes: types_de_champ_changes }
|
||||
|
||||
- if types_de_champ_private_changes.present?
|
||||
.container
|
||||
.card.featured
|
||||
.card-title
|
||||
= t(:has_private_changes, count: types_de_champ_private_changes.size, scope: [:new_administrateur, :revision_changes])
|
||||
= render partial: 'revision_changes', locals: { changes: types_de_champ_private_changes }
|
||||
|
||||
.container
|
||||
%h2.procedure-admin-explanation Indispensable avant publication
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue