[#1568] Inline partial that is only used in one view
This commit is contained in:
parent
521aec6af9
commit
bdece939c8
2 changed files with 64 additions and 65 deletions
|
@ -1,64 +0,0 @@
|
|||
.container#description-page
|
||||
- if notice_url(@dossier.procedure).present?
|
||||
#lien_notice_panel.row{ style: 'width: 280px; position: fixed; background-color: white; right: 5%; top: 80px; z-index: 200;' }
|
||||
.panel.panel-info{ style: 'margin-bottom: 0;' }
|
||||
.panel-body.center
|
||||
.row
|
||||
.col-xs-1
|
||||
.fa.fa-info-circle.text-info{ style: 'font-size: 2em; margin-top: 20%;' }
|
||||
.col-xs-10{ style: 'padding-right: 0px;' }
|
||||
%b
|
||||
= link_to 'Accéder au guide', notice_url(@dossier.procedure), { target: '_blank' }
|
||||
pour remplir pour votre dossier
|
||||
|
||||
%h2.text-info
|
||||
= @dossier.procedure.libelle
|
||||
|
||||
-# TODO use form_for
|
||||
= form_tag(url_for({ controller: 'users/description', action: :update, dossier_id: @dossier.id }), class: 'form', method: 'POST', multipart: true) do
|
||||
- if @champs.present?
|
||||
#liste-champs
|
||||
= render partial: 'users/description/champs', locals: { private: false }
|
||||
|
||||
- if @procedure.lien_demarche.present? || @procedure.cerfa_flag || @dossier.types_de_piece_justificative.size > 0
|
||||
%br
|
||||
%h3 Pièces jointes
|
||||
|
||||
|
||||
-# TODO a refactorer
|
||||
.row
|
||||
.col-lg-8
|
||||
= render partial: 'users/description/pieces_justificatives', locals: { dossier: @dossier }
|
||||
|
||||
%div{ style: 'text-align: right;' }
|
||||
%h6 Tous les champs portant un * sont obligatoires.
|
||||
|
||||
- if !@dossier.can_be_en_construction?
|
||||
.alert.alert-danger
|
||||
= t('errors.messages.procedure_archived')
|
||||
- elsif !@dossier.brouillon?
|
||||
= render partial: '/layouts/modifications_terminees'
|
||||
- else
|
||||
= hidden_field_tag 'submit_action', 'brouillon'
|
||||
= submit_tag 'Bonjour Active Storage !', style: 'display: none;'
|
||||
= button_tag 'Soumettre mon dossier',
|
||||
id: 'suivant',
|
||||
type: 'submit',
|
||||
class: 'btn btn btn-success',
|
||||
style: 'float: right;',
|
||||
disabled: @procedure.archivee?,
|
||||
data: { disable: true, action: 'nouveaux' }
|
||||
= button_tag 'Enregistrer un brouillon',
|
||||
id: 'brouillon',
|
||||
type: 'submit',
|
||||
class: 'btn btn-xs btn-default',
|
||||
style: 'float: right; margin-right: 10px; margin-top: 6px;',
|
||||
disabled: @procedure.archivee?,
|
||||
data: { disable: true, action: 'brouillon' }
|
||||
= button_tag "Enregistrer et voir mes dossiers",
|
||||
id: 'brouillon_then_dashboard',
|
||||
type: 'submit',
|
||||
class: 'btn btn-xs btn-default',
|
||||
style: 'float: right; margin-right: 10px; margin-top: 6px;',
|
||||
disabled: @procedure.archivee?,
|
||||
data: { disable: true, action: 'brouillon_then_dashboard' }
|
|
@ -1 +1,64 @@
|
|||
= render partial: 'show'
|
||||
.container#description-page
|
||||
- if notice_url(@dossier.procedure).present?
|
||||
#lien_notice_panel.row{ style: 'width: 280px; position: fixed; background-color: white; right: 5%; top: 80px; z-index: 200;' }
|
||||
.panel.panel-info{ style: 'margin-bottom: 0;' }
|
||||
.panel-body.center
|
||||
.row
|
||||
.col-xs-1
|
||||
.fa.fa-info-circle.text-info{ style: 'font-size: 2em; margin-top: 20%;' }
|
||||
.col-xs-10{ style: 'padding-right: 0px;' }
|
||||
%b
|
||||
= link_to 'Accéder au guide', notice_url(@dossier.procedure), { target: '_blank' }
|
||||
pour remplir pour votre dossier
|
||||
|
||||
%h2.text-info
|
||||
= @dossier.procedure.libelle
|
||||
|
||||
-# TODO use form_for
|
||||
= form_tag(url_for({ controller: 'users/description', action: :update, dossier_id: @dossier.id }), class: 'form', method: 'POST', multipart: true) do
|
||||
- if @champs.present?
|
||||
#liste-champs
|
||||
= render partial: 'users/description/champs', locals: { private: false }
|
||||
|
||||
- if @procedure.lien_demarche.present? || @procedure.cerfa_flag || @dossier.types_de_piece_justificative.size > 0
|
||||
%br
|
||||
%h3 Pièces jointes
|
||||
|
||||
|
||||
-# TODO a refactorer
|
||||
.row
|
||||
.col-lg-8
|
||||
= render partial: 'users/description/pieces_justificatives', locals: { dossier: @dossier }
|
||||
|
||||
%div{ style: 'text-align: right;' }
|
||||
%h6 Tous les champs portant un * sont obligatoires.
|
||||
|
||||
- if !@dossier.can_be_en_construction?
|
||||
.alert.alert-danger
|
||||
= t('errors.messages.procedure_archived')
|
||||
- elsif !@dossier.brouillon?
|
||||
= render partial: '/layouts/modifications_terminees'
|
||||
- else
|
||||
= hidden_field_tag 'submit_action', 'brouillon'
|
||||
= submit_tag 'Bonjour Active Storage !', style: 'display: none;'
|
||||
= button_tag 'Soumettre mon dossier',
|
||||
id: 'suivant',
|
||||
type: 'submit',
|
||||
class: 'btn btn btn-success',
|
||||
style: 'float: right;',
|
||||
disabled: @procedure.archivee?,
|
||||
data: { disable: true, action: 'nouveaux' }
|
||||
= button_tag 'Enregistrer un brouillon',
|
||||
id: 'brouillon',
|
||||
type: 'submit',
|
||||
class: 'btn btn-xs btn-default',
|
||||
style: 'float: right; margin-right: 10px; margin-top: 6px;',
|
||||
disabled: @procedure.archivee?,
|
||||
data: { disable: true, action: 'brouillon' }
|
||||
= button_tag "Enregistrer et voir mes dossiers",
|
||||
id: 'brouillon_then_dashboard',
|
||||
type: 'submit',
|
||||
class: 'btn btn-xs btn-default',
|
||||
style: 'float: right; margin-right: 10px; margin-top: 6px;',
|
||||
disabled: @procedure.archivee?,
|
||||
data: { disable: true, action: 'brouillon_then_dashboard' }
|
||||
|
|
Loading…
Reference in a new issue