2020-07-15 10:48:11 +02:00
= render partial: 'new_administrateur/breadcrumbs',
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
2020-09-08 12:35:44 +02:00
= link_to apercu_admin_procedure_path(@procedure), 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
2020-07-17 11:10:54 +02:00
- if @procedure.brouillon?
2020-07-20 10:37:08 +02:00
= link_to sanitize_url(@procedure_lien), target: :blank, rel: :noopener, class: 'button' do
%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
= t(:has_changes, scope: [:new_administrateur, :revision_changes])
= 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-06-10 15:37:45 +02:00
= link_to champs_admin_procedure_path(@procedure), class: 'card-admin' do
2020-08-27 19:55:10 +02:00
- if @procedure.draft_types_de_champ.count > 0
2020-07-21 16:24:57 +02:00
%div
%span.icon.accept
%p.card-admin-status-accept Validé
- else
%div
%span.icon.clock
%p.card-admin-status-todo À faire
2020-07-15 10:48:11 +02:00
%div
2020-07-21 16:24:57 +02:00
%p.card-admin-title
2020-08-27 19:55:10 +02:00
%span.badge.baseline= @procedure.draft_types_de_champ.count
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
2020-07-20 10:37:08 +02:00
%span.badge.baseline= @procedure.administrateurs.count
#{"Administrateur".pluralize(@procedure.administrateurs.count)}
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-06-10 15:37:45 +02:00
- if feature_enabled?(:administrateur_routage)
- instructeur_link = admin_procedure_groupe_instructeurs_path(@procedure)
- else
- instructeur_link = admin_procedure_groupe_instructeur_path(@procedure, @procedure.defaut_groupe_instructeur)
= link_to instructeur_link, id: 'groupe-instructeurs', class: 'card-admin' do
- if feature_enabled?(:administrateur_routage) || @procedure.instructeurs.count > 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
2020-07-17 11:10:54 +02:00
- if feature_enabled?(:administrateur_routage)
2020-07-20 10:37:08 +02:00
%span.badge.baseline= @procedure.groupe_instructeurs.count
2020-07-17 11:10:54 +02:00
- else
2020-07-20 10:37:08 +02:00
%span.badge.baseline= @procedure.instructeurs.count
= feature_enabled?(:administrateur_routage) ? "Groupe Instructeurs" : "#{"Instructeur".pluralize(@procedure.instructeurs.count)}"
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
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
2020-08-04 10:45:49 +02:00
- if @procedure.attestation_template.present? && @procedure.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)
2021-06-10 15:37:45 +02:00
= link_to annotations_admin_procedure_path(@procedure), class: 'card-admin' 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é
- 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
%p.card-admin-title Jeton
%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-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