Procedure Preview: add annotations preview
This commit is contained in:
parent
366ef2d2b5
commit
48c5d5a917
2 changed files with 26 additions and 5 deletions
|
@ -2,10 +2,15 @@ module NewAdministrateur
|
|||
class ProceduresController < AdministrateurController
|
||||
def apercu
|
||||
@dossier = procedure_without_control.new_dossier
|
||||
@tab = apercu_tab
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def apercu_tab
|
||||
params[:tab] || 'dossier'
|
||||
end
|
||||
|
||||
def procedure_without_control
|
||||
Procedure.find(params[:id])
|
||||
end
|
||||
|
|
|
@ -1,6 +1,22 @@
|
|||
.dossier-edit
|
||||
.dossier-header
|
||||
.dossiers-headers.accompagnateur-header
|
||||
.container
|
||||
%h1 Prévisualisation de la procédure #{@dossier.procedure.libelle}
|
||||
%h1.page-title Prévisualisation de la procédure #{@dossier.procedure.libelle}
|
||||
|
||||
= render partial: "shared/dossiers/edit", locals: { dossier: @dossier, apercu: true }
|
||||
%ul.tabs
|
||||
%li{ class: (@tab == 'dossier') ? 'active' : nil }>
|
||||
= link_to(apercu_procedure_path(@dossier.procedure, tab: 'dossier')) do
|
||||
le dossier
|
||||
- if @dossier.champs_private.size > 0
|
||||
%li{ class: (@tab == 'annotations-privees') ? 'active' : nil }>
|
||||
= link_to(apercu_procedure_path(@dossier.procedure, tab: 'annotations-privees')) do
|
||||
les annotations privees
|
||||
|
||||
- if @tab == 'dossier'
|
||||
= render partial: "shared/dossiers/edit", locals: { dossier: @dossier, apercu: true }
|
||||
- else
|
||||
.container
|
||||
= form_for @dossier, url: '', method: :get, html: { class: 'form' } do |f|
|
||||
= f.fields_for :champs_private, @dossier.champs_private do |champ_form|
|
||||
- champ = champ_form.object
|
||||
= render partial: "shared/dossiers/editable_champs/editable_champ",
|
||||
locals: { champ: champ, form: champ_form }
|
||||
|
|
Loading…
Reference in a new issue