demarches-normaliennes/app/views/users/description/_show.html.haml

47 lines
2.2 KiB
Text
Raw Normal View History

.container#description-page
- unless @dossier.procedure.lien_notice.blank?
#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
2017-03-15 17:48:35 +01:00
.col-xs-1
.fa.fa-info-circle.text-info{ style: 'font-size: 2em; margin-top: 20%;' }
.col-xs-10{ style: 'padding-right: 0px;' }
%b
2017-04-06 19:10:25 +02:00
= link_to 'Accéder au guide', @dossier.procedure.lien_notice, { target: '_blank' }
pour remplir pour votre dossier
%h2.text-info
= @dossier.procedure.libelle
-# TODO use form_for
2017-04-06 19:10:25 +02:00
= form_tag(url_for({ controller: 'users/description', action: :update, dossier_id: @dossier.id }), class: 'form', method: 'POST', multipart: true) do
- unless @champs.nil?
#liste-champs
= render partial: 'users/description/champs', locals: { private: false }
- if !@procedure.lien_demarche.blank? || @procedure.cerfa_flag || @dossier.types_de_piece_justificative.size > 0
%br
2017-03-20 12:03:27 +01:00
%h3 Pièces jointes
2017-04-06 15:48:37 +02:00
-# TODO a refactorer
.row
.col-lg-8
= render partial: 'users/description/pieces_justificatives', locals: { dossier: @dossier }
-# WTF ?
- route = Rails.application.routes.recognize_path(request.referrer)
- unless route[:controller].match('admin')
%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')
2017-12-04 16:17:15 +01:00
- elsif !@dossier.brouillon?
= render partial: '/layouts/modifications_terminees'
- else
= submit_tag 'Soumettre mon dossier', id: 'suivant', name: 'submit[nouveaux]', class: 'btn btn btn-success', style: 'float: right;', disabled: @procedure.archivee?, data: { disable_with: 'Soumettre votre dossier', submit: true }
= submit_tag 'Enregistrer un brouillon', id: 'brouillon', name: 'submit[brouillon]', class: 'btn btn-xs btn-default', style: 'float: right; margin-right: 10px; margin-top: 6px;', disabled: @procedure.archivee?, data: { disable_with: 'Enregistrer un brouillon', submit: true }