2019-01-16 11:57:58 +01:00
|
|
|
|
- content_for(:title, @procedure.libelle)
|
|
|
|
|
|
|
|
|
|
.commencer.form
|
|
|
|
|
- if !user_signed_in?
|
2019-11-06 16:58:07 +01:00
|
|
|
|
%h2.huge-title Commencer la démarche
|
2020-07-27 16:35:05 +02:00
|
|
|
|
= render partial: 'shared/france_connect_login', locals: { url: commencer_france_connect_path(path: @procedure.path) }
|
2019-04-02 14:45:59 +02:00
|
|
|
|
= link_to commencer_sign_up_path(path: @procedure.path), class: ['button large expand primary'] do
|
|
|
|
|
Créer un compte
|
|
|
|
|
%span.optional-on-small-screens
|
2020-07-22 10:32:20 +02:00
|
|
|
|
#{APPLICATION_NAME}
|
2019-01-16 11:57:58 +01:00
|
|
|
|
= link_to 'J’ai déjà un compte', commencer_sign_in_path(path: @procedure.path), class: ['button large expand']
|
|
|
|
|
|
|
|
|
|
- else
|
2021-06-24 11:57:05 +02:00
|
|
|
|
- dossiers = current_user.dossiers.where(revision: @revision.draft? ? @revision : @procedure.revisions.where.not(id: @procedure.draft_revision_id))
|
2019-01-16 11:57:58 +01:00
|
|
|
|
- drafts = dossiers.merge(Dossier.state_brouillon)
|
|
|
|
|
- not_drafts = dossiers.merge(Dossier.state_not_brouillon)
|
|
|
|
|
|
|
|
|
|
- if dossiers.count == 0
|
2021-04-17 18:49:00 +02:00
|
|
|
|
= link_to t('views.commencer.show.start_procedure'), url_for_new_dossier(@revision), class: ['button large expand primary']
|
2019-01-16 11:57:58 +01:00
|
|
|
|
|
|
|
|
|
- elsif drafts.count == 1 && not_drafts.count == 0
|
2019-01-21 15:19:17 +01:00
|
|
|
|
- dossier = drafts.first
|
2019-11-06 16:58:07 +01:00
|
|
|
|
%h2.huge-title Vous avez déjà commencé à remplir un dossier
|
2019-01-21 15:19:17 +01:00
|
|
|
|
%p
|
|
|
|
|
Il y a <strong>#{time_ago_in_words(dossier.created_at)}</strong>,
|
|
|
|
|
vous avez commencé à remplir un dossier sur la démarche « #{dossier.procedure.libelle} ».
|
|
|
|
|
= link_to 'Continuer à remplir mon dossier', brouillon_dossier_path(dossier), class: ['button large expand primary']
|
2021-06-24 11:57:05 +02:00
|
|
|
|
= link_to 'Commencer un nouveau dossier', url_for_new_dossier(@revision), class: ['button large expand']
|
2019-01-16 11:57:58 +01:00
|
|
|
|
|
|
|
|
|
- elsif not_drafts.count == 1
|
2019-01-21 15:19:17 +01:00
|
|
|
|
- dossier = not_drafts.first
|
2019-11-06 16:58:07 +01:00
|
|
|
|
%h2.huge-title Vous avez déjà déposé un dossier
|
2019-01-21 15:19:17 +01:00
|
|
|
|
%p
|
|
|
|
|
Il y a <strong>#{time_ago_in_words(dossier.en_construction_at)}</strong>,
|
|
|
|
|
vous avez déposé un dossier sur la démarche « #{dossier.procedure.libelle} ».
|
|
|
|
|
= link_to 'Voir mon dossier déposé', dossier_path(dossier), class: ['button large expand primary']
|
2021-06-24 11:57:05 +02:00
|
|
|
|
= link_to 'Commencer un nouveau dossier', url_for_new_dossier(@revision), class: ['button large expand']
|
2019-01-16 11:57:58 +01:00
|
|
|
|
|
|
|
|
|
- else
|
2021-04-17 18:49:00 +02:00
|
|
|
|
%h2.huge-title= t('views.commencer.show.existing_dossiers')
|
|
|
|
|
= link_to t('views.commencer.show.show_dossiers'), dossiers_path, class: ['button large expand primary']
|
|
|
|
|
= link_to t('views.commencer.show.start_new_dossier'), url_for_new_dossier(@revision), class: ['button large expand']
|
2020-02-27 17:39:19 +01:00
|
|
|
|
|
2021-03-03 18:20:34 +01:00
|
|
|
|
- if @procedure.feature_enabled?(:dossier_pdf_vide)
|
2021-06-24 11:57:05 +02:00
|
|
|
|
- pdf_link = @revision.draft? ? commencer_dossier_vide_test_path(path: @procedure.path) : commencer_dossier_vide_path(path: @procedure.path)
|
2020-03-04 15:51:33 +01:00
|
|
|
|
%hr
|
|
|
|
|
%p
|
|
|
|
|
Vous souhaitez effectuer une demande par papier ? Vous pouvez télécharger un dossier vide au format PDF,
|
2020-03-04 16:30:45 +01:00
|
|
|
|
et l'envoyer à l’administration concernée :
|
|
|
|
|
#{@procedure&.service&.nom} - #{@procedure&.service&.adresse}
|
2020-03-04 15:51:33 +01:00
|
|
|
|
%br
|
|
|
|
|
= link_to 'Télécharger un dossier vide au format PDF', pdf_link, class: ['button large expand']
|