feat(conditional): block actions and hide revision details if procedure invalid
This commit is contained in:
parent
f4b465a03f
commit
bad058891b
1 changed files with 28 additions and 27 deletions
|
@ -4,6 +4,7 @@
|
|||
metadatas: ["Créée le #{@procedure.created_at.strftime('%d/%m/%Y')} - n° #{@procedure.id}", "#{@procedure.close? ? "Close le #{@procedure.closed_at.strftime('%d/%m/%Y')}" : @procedure.locked? ? "Publiée - #{procedure_lien(@procedure)}" : "Brouillon"}"] }
|
||||
|
||||
.container.procedure-admin-container
|
||||
- if @procedure.draft_revision.valid?
|
||||
- if !@procedure.brouillon?
|
||||
= link_to admin_procedure_archives_path(@procedure), class: 'button', id: "archive-procedure" do
|
||||
%span.icon.download
|
||||
|
@ -41,7 +42,7 @@
|
|||
.container
|
||||
= render TypesDeChampEditor::ErrorsSummary.new(revision: @procedure.draft_revision)
|
||||
|
||||
- if @procedure.draft_changed?
|
||||
- if @procedure.draft_changed? && @procedure.draft_revision.valid?
|
||||
.container
|
||||
.card.featured
|
||||
.card-title
|
||||
|
|
Loading…
Add table
Reference in a new issue