2019-01-16 11:57:58 +01:00
|
|
|
- content_for(:title, @procedure.libelle)
|
|
|
|
|
|
|
|
.commencer.form
|
|
|
|
- if !user_signed_in?
|
2023-10-09 22:08:24 +02:00
|
|
|
= render Dsfr::CalloutComponent.new(title: t(".start_procedure"), heading_level: 'h2') do |c|
|
2024-08-07 11:22:52 +02:00
|
|
|
- c.with_html_body do
|
2024-09-23 12:29:48 +02:00
|
|
|
= render partial: 'shared/france_connect_login', locals: { url: commencer_france_connect_path(path: @procedure.path, prefill_token: @prefilled_dossier&.prefill_token), heading_level: :h3 }
|
2023-07-11 15:18:39 +02:00
|
|
|
%ul.fr-btns-group.fr-btns-group--inline
|
|
|
|
%li
|
|
|
|
= link_to commencer_sign_up_path(path: @procedure.path, prefill_token: @prefilled_dossier&.prefill_token), class: 'fr-btn' do
|
|
|
|
= t('views.shared.account.create')
|
|
|
|
%span.optional-on-small-screens.fr-ml-1v
|
2024-03-20 11:34:54 +01:00
|
|
|
#{Current.application_name}
|
2023-07-11 15:18:39 +02:00
|
|
|
%li= link_to t('views.shared.account.already_user'), commencer_sign_in_path(path: @procedure.path, prefill_token: @prefilled_dossier&.prefill_token), class: 'fr-btn fr-btn--secondary'
|
2019-01-16 11:57:58 +01:00
|
|
|
|
2024-07-03 15:37:24 +02:00
|
|
|
= render ProcedureDraftWarningComponent.new(revision: @revision, current_administrateur:, extra_class_names: "fr-mb-2w")
|
|
|
|
|
2019-01-16 11:57:58 +01:00
|
|
|
- else
|
2024-07-03 15:37:24 +02:00
|
|
|
= render ProcedureDraftWarningComponent.new(revision: @revision, current_administrateur:, extra_class_names: "fr-mb-2w")
|
|
|
|
|
2023-02-08 14:38:01 +01:00
|
|
|
- if @prefilled_dossier
|
2023-10-09 22:08:24 +02:00
|
|
|
= render Dsfr::CalloutComponent.new(title: t(".prefilled_draft"), heading_level: 'h2') do |c|
|
2024-01-08 11:22:38 +01:00
|
|
|
- c.with_body do
|
2023-10-09 22:08:24 +02:00
|
|
|
%p= t('.prefilled_draft_detail_html', time_ago: time_ago_in_words(@prefilled_dossier.created_at), procedure: @procedure.libelle)
|
|
|
|
= link_to t('.go_to_prefilled_file'), url_for_dossier(@prefilled_dossier), class: 'fr-btn fr-mb-2w'
|
2019-01-16 11:57:58 +01:00
|
|
|
|
2023-10-09 22:27:45 +02:00
|
|
|
- elsif @dossiers.empty?
|
2023-10-09 22:08:24 +02:00
|
|
|
= link_to t('.start_procedure'), url_for_new_dossier(@revision), class: 'fr-btn fr-mb-2w'
|
2023-01-03 14:46:10 +01:00
|
|
|
|
2023-10-09 22:27:45 +02:00
|
|
|
- elsif @drafts.size == 1 && @not_drafts.empty?
|
|
|
|
- dossier = @drafts.first
|
2023-10-09 22:08:24 +02:00
|
|
|
= render Dsfr::CalloutComponent.new(title: t(".already_draft"), heading_level: 'h2') do |c|
|
2024-01-08 11:22:38 +01:00
|
|
|
- c.with_body do
|
2023-05-22 15:36:48 +02:00
|
|
|
%p
|
2023-10-09 22:48:36 +02:00
|
|
|
= t('.already_draft_detail_html', time_ago: time_ago_in_words(dossier.created_at), procedure: @procedure.libelle)
|
2023-07-11 15:18:39 +02:00
|
|
|
%ul.fr-btns-group.fr-btns-group--inline
|
2023-10-09 22:08:24 +02:00
|
|
|
%li= link_to t('.continue_file'), url_for_dossier(dossier), class: 'fr-btn'
|
|
|
|
%li= link_to t('.start_new_file'), url_for_new_dossier(@revision), class: 'fr-btn fr-btn--secondary'
|
2019-01-16 11:57:58 +01:00
|
|
|
|
2023-10-09 22:27:45 +02:00
|
|
|
- elsif @not_drafts.size == 1
|
|
|
|
- dossier = @not_drafts.first
|
2023-10-09 22:08:24 +02:00
|
|
|
= render Dsfr::CalloutComponent.new(title: t(".already_not_draft"), heading_level: 'h2') do |c|
|
2024-01-08 11:22:38 +01:00
|
|
|
- c.with_body do
|
2023-05-22 15:36:48 +02:00
|
|
|
%p
|
2023-10-09 22:48:36 +02:00
|
|
|
= t('.already_not_draft_detail_html', time_ago: time_ago_in_words(dossier.depose_at), procedure: @procedure.libelle)
|
2023-07-11 15:18:39 +02:00
|
|
|
%ul.fr-btns-group.fr-btns-group--inline
|
2023-10-09 22:08:24 +02:00
|
|
|
%li= link_to t('.show_my_submitted_file'), url_for_dossier(dossier), class: 'fr-btn'
|
|
|
|
%li= link_to t('.start_new_file'), url_for_new_dossier(@revision), class: 'fr-btn fr-btn--secondary'
|
2019-01-16 11:57:58 +01:00
|
|
|
|
|
|
|
- else
|
2023-10-09 22:08:24 +02:00
|
|
|
= render Dsfr::CalloutComponent.new(title: t(".existing_dossiers"), heading_level: 'h2') do |c|
|
2024-01-08 11:22:38 +01:00
|
|
|
- c.with_body do
|
2023-07-11 15:18:39 +02:00
|
|
|
%ul.fr-btns-group.fr-btns-group--inline
|
2023-10-09 22:08:24 +02:00
|
|
|
%li= link_to t('.show_dossiers'), dossiers_path(procedure_id: @procedure.id), class: "fr-btn"
|
|
|
|
%li= link_to t('.start_new_file'), url_for_new_dossier(@revision), class: "fr-btn fr-btn--secondary"
|
2023-10-09 22:27:45 +02:00
|
|
|
%p= t('.already_created', count: @preview_dossiers.size)
|
2023-10-09 22:53:35 +02:00
|
|
|
%ul
|
2023-10-09 22:27:45 +02:00
|
|
|
- @preview_dossiers.each do |dossier|
|
2023-10-09 22:08:24 +02:00
|
|
|
%li= link_to t('.already_created_details_html',
|
2023-10-09 22:53:35 +02:00
|
|
|
id: number_with_html_delimiter(dossier.id),
|
|
|
|
created_at: time_ago_in_words(dossier.created_at),
|
|
|
|
state: dossier_display_state(dossier.state, lower: true)),
|
|
|
|
dossier_path(dossier)
|
2023-05-22 15:36:48 +02:00
|
|
|
|
2020-02-27 17:39:19 +01:00
|
|
|
|
2021-03-03 18:20:34 +01:00
|
|
|
- if @procedure.feature_enabled?(:dossier_pdf_vide)
|
2020-03-04 15:51:33 +01:00
|
|
|
%hr
|
2023-10-09 22:08:24 +02:00
|
|
|
%p= t('.want_empty_pdf', service: @procedure&.service&.nom, adresse: @procedure&.service&.adresse)
|
2021-08-19 18:25:32 +02:00
|
|
|
|
2020-03-04 15:51:33 +01:00
|
|
|
%br
|
2023-10-09 22:08:24 +02:00
|
|
|
= link_to t('.download_empty_pdf'), commencer_dossier_vide_for_revision_path(@revision), class: "fr-btn fr-btn--secondary fr-mb-2w"
|