2021-11-25 16:26:55 +01:00
= render partial: 'administrateurs/breadcrumbs',
2020-07-15 10:48:11 +02:00
locals: { steps: [link_to('Démarches', admin_procedures_path),
2021-04-19 16:32:50 +02:00
"#{@procedure.libelle}", ],
metadatas: ["Créée le #{@procedure.created_at.strftime('%d/%m/%Y')} - n° #{@procedure.id}", "#{@procedure.close? ? "Close le #{@procedure.closed_at.strftime('%d/%m/%Y')}" : @procedure.locked? ? "Publiée - #{procedure_lien(@procedure)}" : "Brouillon"}"] }
2020-07-20 10:37:08 +02:00
.container.procedure-admin-container
2022-04-22 15:49:34 +02:00
= link_to @procedure.active_revision.draft? ? commencer_dossier_vide_test_path(path: @procedure.path) : commencer_dossier_vide_path(path: @procedure.path), target: "_blank", rel: "noopener", class: 'button', id: "pdf-procedure" do
%span.icon.printer
PDF
2021-10-04 10:38:23 +02:00
= link_to apercu_admin_procedure_path(@procedure), target: "_blank", rel: "noopener", class: 'button', id: "preview-procedure" do
2020-07-20 10:37:08 +02:00
%span.icon.preview
Prévisualiser
2020-07-15 10:48:11 +02:00
2021-06-24 11:57:05 +02:00
- if @procedure.brouillon? || @procedure.draft_changed?
= link_to sanitize_url(@procedure_lien_test), target: :blank, rel: :noopener, class: 'button' do
2020-07-20 10:37:08 +02:00
%span.icon.in-progress
Tester
2020-07-29 17:05:19 +02:00
- if @procedure.publiee? || @procedure.brouillon?
2020-09-29 10:52:13 +02:00
= link_to admin_procedure_transfert_path(@procedure), class: 'button' do
2020-07-29 17:05:19 +02:00
%span.icon.reply
Envoyer une copie
2020-09-08 12:35:44 +02:00
- if !@procedure.publiee? && !@procedure.close? && !@procedure.depubliee?
2020-07-20 10:37:08 +02:00
= link_to 'Publier', admin_procedure_publication_path(@procedure), class: 'button primary', id: 'publish-procedure-link', data: { disable_with: "Publication..." }
2020-09-08 12:35:44 +02:00
- if @procedure.close? || @procedure.depubliee?
= link_to 'Réactiver', admin_procedure_publication_path(@procedure), class: 'button primary', id: 'publish-procedure-link', data: { disable_with: "Publication..." }
2020-07-28 15:15:56 +02:00
- if @procedure.locked? && !@procedure.close?
2020-09-08 12:35:44 +02:00
= link_to admin_procedure_archive_path(procedure_id: @procedure.id), method: :put, class: 'button', id: "close-procedure-link", data: { confirm: "Voulez-vous vraiment clore la démarche ? \nLes dossiers en cours pourront être instruits, mais aucun nouveau dossier ne pourra plus être déposé.", disable_with: "Archivage..."} do
2020-07-20 10:37:08 +02:00
%span.icon.archive
2020-07-28 15:15:56 +02:00
Clore
2020-07-15 10:48:11 +02:00
2021-06-18 11:15:10 +02:00
- if @procedure.draft_changed?
= link_to 'Publier les modifications', admin_procedure_publication_path(@procedure), class: 'button primary', id: 'publish-procedure-link', data: { disable_with: "Publication..." }
- if @procedure.draft_changed?
2021-06-23 18:56:04 +02:00
.container
.card.featured
.card-title
2021-11-25 16:26:55 +01:00
= t(:has_changes, scope: [:administrateurs, :revision_changes])
2021-06-23 18:56:04 +02:00
= render partial: 'revision_changes', locals: { changes: @procedure.revision_changes }
2021-06-18 11:15:10 +02:00
2020-07-15 10:48:11 +02:00
.container
2020-07-20 10:37:08 +02:00
%h2.procedure-admin-explanation Indispensable avant publication
2020-07-15 16:59:26 +02:00
.procedure-grid
2021-06-10 15:37:45 +02:00
= link_to edit_admin_procedure_path(@procedure), id: 'presentation', class: 'card-admin' do
2020-07-15 10:48:11 +02:00
%div
%span.icon.accept
%p.card-admin-status-accept Validé
%div
%p.card-admin-title Présentation
%p.card-admin-subtitle Logo, nom, description
2021-06-10 15:37:45 +02:00
%p.button Modifier
2020-07-15 10:48:11 +02:00
2021-06-18 11:15:10 +02:00
- if !@procedure.locked? || @procedure.feature_enabled?(:procedure_revisions)
2021-11-24 11:08:57 +01:00
- @procedure.validate(:publication)
2022-01-26 17:52:32 +01:00
- error_messages = @procedure.errors.messages_for(:draft_types_de_champ).to_sentence
2021-11-24 11:08:57 +01:00
= link_to champs_admin_procedure_path(@procedure), class: 'card-admin', title: error_messages do
2022-03-16 16:21:54 +01:00
- if @procedure.draft_types_de_champ.empty?
2020-07-21 16:24:57 +02:00
%div
%span.icon.clock
%p.card-admin-status-todo À faire
2021-11-24 11:08:57 +01:00
- elsif error_messages.present?
%div
%span.icon.refuse
%p.card-admin-status-error À modifier
- else
%div
%span.icon.accept
%p.card-admin-status-accept Validé
2020-07-15 10:48:11 +02:00
%div
2020-07-21 16:24:57 +02:00
%p.card-admin-title
2022-03-16 16:21:54 +01:00
%span.badge.baseline= @procedure.draft_types_de_champ.size
2020-07-21 16:24:57 +02:00
Champs du formulaire
%p.card-admin-subtitle À remplir par les usagers
2021-06-10 15:37:45 +02:00
%p.button Modifier
- if @procedure.service.present?
- service_link = edit_admin_service_path(@procedure.service, procedure_id: @procedure.id)
- service_button_text = 'Modifier'
- elsif current_administrateur.services.present?
- service_link = admin_services_path(procedure_id: @procedure.id)
- service_button_text = 'Choisir'
- else
- service_link = new_admin_service_path(procedure_id: @procedure.id)
- service_button_text = 'Remplir'
= link_to service_link, class: 'card-admin' do
2020-07-15 10:48:11 +02:00
- if @procedure.service_id.present?
%div
%span.icon.accept
%p.card-admin-status-accept Validé
- else
%div
%span.icon.clock
%p.card-admin-status-todo À faire
%div
%p.card-admin-title Service
2020-07-20 10:37:08 +02:00
%p.card-admin-subtitle
- if @procedure.service_id.present?
= @procedure.service.nom
- else
Choix du service administratif
2021-06-10 15:37:45 +02:00
%p.button= service_button_text
2020-07-15 10:48:11 +02:00
2021-06-10 15:37:45 +02:00
= link_to admin_procedure_administrateurs_path(@procedure), id: 'administrateurs', class: 'card-admin' do
2020-07-15 10:48:11 +02:00
%div
%span.icon.accept
%p.card-admin-status-accept Validé
%div
%p.card-admin-title
2022-03-16 16:21:54 +01:00
%span.badge.baseline= @procedure.administrateurs.size
#{"Administrateur".pluralize(@procedure.administrateurs.size)}
2020-07-15 10:48:11 +02:00
%p.card-admin-subtitle Gestion de la démarche
2021-06-10 15:37:45 +02:00
%p.button Modifier
2020-07-15 10:48:11 +02:00
2021-09-14 19:47:53 +02:00
= link_to admin_procedure_groupe_instructeurs_path(@procedure), id: 'groupe-instructeurs', class: 'card-admin' do
2022-03-16 16:21:54 +01:00
- if @procedure.routee? || @procedure.instructeurs.size > 1
2020-07-15 10:48:11 +02:00
%div
%span.icon.accept
%p.card-admin-status-accept Validé
- else
%div
%span.icon.clock
%p.card-admin-status-todo À faire
%div
%p.card-admin-title
2021-09-14 19:47:53 +02:00
- if @procedure.routee?
2022-03-16 16:21:54 +01:00
%span.badge.baseline= @procedure.groupe_instructeurs.size
2020-07-17 11:10:54 +02:00
- else
2022-03-16 16:21:54 +01:00
%span.badge.baseline= @procedure.instructeurs.size
2020-07-20 10:37:08 +02:00
2022-03-16 16:21:54 +01:00
= @procedure.routee? ? "Groupe Instructeurs" : "#{"Instructeur".pluralize(@procedure.instructeurs.size)}"
2020-07-15 10:48:11 +02:00
%p.card-admin-subtitle Suivi des dossiers
2021-06-10 15:37:45 +02:00
%p.button Modifier
2020-07-17 11:10:54 +02:00
2022-03-16 16:23:53 +01:00
- if @procedure.revised?
= link_to modifications_admin_procedure_path(@procedure), id: 'modifications', class: 'card-admin' do
%div
%span.icon.accept
%p.card-admin-status-accept Activée
%div
%p.card-admin-title
%span.badge.baseline= @procedure.revisions.size - 1
Modifications
%p.card-admin-subtitle Historique des modifications du formulaire
%p.button Voir
2020-07-20 10:37:08 +02:00
%h2.procedure-admin-explanation Pour aller plus loin
2020-07-15 16:59:26 +02:00
.procedure-grid
2021-06-10 15:37:45 +02:00
= link_to edit_admin_procedure_attestation_template_path(@procedure), class: 'card-admin' do
2022-02-02 16:10:29 +01:00
- if @procedure.draft_attestation_template&.activated?
2020-07-15 10:48:11 +02:00
%div
%span.icon.accept
%p.card-admin-status-accept Activée
- else
%div
%span.icon.clock
2020-08-04 10:45:49 +02:00
%p.card-admin-status-todo Désactivée
2020-07-15 10:48:11 +02:00
%div
%p.card-admin-title Attestation
%p.card-admin-subtitle Délivrance automatique pour les dossiers acceptés
2021-06-10 15:37:45 +02:00
%p.button Modifier
2020-07-15 10:48:11 +02:00
2021-06-10 15:37:45 +02:00
= link_to admin_procedure_experts_path(@procedure), class: 'card-admin' do
2020-09-30 18:22:06 +02:00
%div
2021-04-16 11:13:47 +02:00
%span.icon.preview
%p.card-admin-status-todo À configurer
%div
%p.card-admin-title Avis externes
%p.card-admin-subtitle Gérer les avis des experts invités
2021-06-10 15:37:45 +02:00
%p.button Modifier
2020-12-18 09:16:41 +01:00
2021-06-10 15:37:45 +02:00
= link_to admin_procedure_mail_templates_path(@procedure), class: 'card-admin' do
2020-07-15 10:48:11 +02:00
%div
%span.icon.clock
%p.card-admin-status-todo À configurer
%div
%p.card-admin-title Configuration des emails
%p.card-admin-subtitle Notifications automatiques
2021-06-10 15:37:45 +02:00
%p.button Modifier
2020-07-16 18:13:51 +02:00
2021-06-18 11:15:10 +02:00
- if !@procedure.locked? || @procedure.feature_enabled?(:procedure_revisions)
2022-01-26 17:52:54 +01:00
- @procedure.validate(:publication)
- error_messages = @procedure.errors.messages_for(:draft_types_de_champ_private).to_sentence
= link_to annotations_admin_procedure_path(@procedure), class: 'card-admin', title: error_messages do
2020-08-27 19:55:10 +02:00
- if @procedure.draft_types_de_champ_private.present?
2020-07-16 18:13:51 +02:00
%div
%span.icon.accept
%p.card-admin-status-accept Validé
2022-01-26 17:52:54 +01:00
- elsif error_messages.present?
%div
%span.icon.refuse
%p.card-admin-status-error À modifier
2020-07-16 18:13:51 +02:00
- else
%div
%span.icon.clock
%p.card-admin-status-todo À configurer
%div
%p.card-admin-title Annotations privées
%p.card-admin-subtitle Champs à remplir par l’ administration
2021-06-10 15:37:45 +02:00
%p.button Modifier
2020-07-15 10:48:11 +02:00
2021-06-10 15:37:45 +02:00
= link_to jeton_admin_procedure_path(@procedure), class: 'card-admin' do
2020-07-15 10:48:11 +02:00
- if @procedure.api_entreprise_token.present?
%div
%span.icon.accept
%p.card-admin-status-accept Validé
- else
%div
%span.icon.clock
%p.card-admin-status-todo À configurer
%div
2021-09-08 16:15:04 +02:00
%p.card-admin-title Jeton Entreprise
2020-07-15 10:48:11 +02:00
%p.card-admin-subtitle Configurer le jeton API entreprise
2021-06-10 15:37:45 +02:00
%p.button Modifier
2020-07-15 10:48:11 +02:00
2021-09-08 16:15:04 +02:00
- if feature_enabled?(:api_particulier)
2021-09-28 15:11:15 +02:00
= link_to admin_procedure_api_particulier_path(@procedure), class: 'card-admin', id: 'api-particulier' do
2021-09-08 16:15:04 +02:00
- if @procedure.api_particulier_token.present?
%div
%span.icon.accept
2021-09-09 19:48:34 +02:00
%p.card-admin-status-accept= t('.ready')
2021-09-08 16:15:04 +02:00
- else
%div
%span.icon.clock
2021-09-09 19:48:34 +02:00
%p.card-admin-status-todo= t('.needs_configuration')
2021-09-08 16:15:04 +02:00
%div
2021-09-09 19:48:34 +02:00
%p.card-admin-title= Procedure.human_attribute_name(:api_particulier_token)
%p.card-admin-subtitle= t('.configure_api_particulier_token')
%p.button= t('views.shared.actions.edit')
2021-09-08 16:15:04 +02:00
2021-06-10 15:37:45 +02:00
= link_to monavis_admin_procedure_path(@procedure), class: 'card-admin' do
2020-07-15 10:48:11 +02:00
- if @procedure.monavis_embed.present?
%div
%span.icon.accept
%p.card-admin-status-accept Validé
- else
%div
%span.icon.clock
%p.card-admin-status-todo À configurer
%div
%p.card-admin-title MonAvis
%p.card-admin-subtitle Avis des usagers sur votre démarche
2021-06-10 15:37:45 +02:00
%p.button Modifier
2022-02-04 14:40:16 +01:00
= link_to edit_admin_procedure_dossier_submitted_message_path(@procedure), class: 'card-admin' do
- if @procedure.active_dossier_submitted_message.present?
%div
%span.icon.accept
%p.card-admin-status-accept Validé
- else
%div
%span.icon.clock
%p.card-admin-status-todo À configurer
%div
%p.card-admin-title Fin de dépot
2022-03-03 16:48:26 +01:00
%p.card-admin-subtitle Orienter l'usager suite à l'envoi de son dossier
2022-02-04 14:40:16 +01:00
%p.button Modifier