264 lines
10 KiB
Text
264 lines
10 KiB
Text
= render partial: 'administrateurs/breadcrumbs',
|
||
locals: { steps: [link_to('Démarches', admin_procedures_path),
|
||
"#{@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"}"] }
|
||
|
||
.container.procedure-admin-container
|
||
= link_to apercu_admin_procedure_path(@procedure), target: "_blank", rel: "noopener", class: 'button', id: "preview-procedure" do
|
||
%span.icon.preview
|
||
Prévisualiser
|
||
|
||
- if @procedure.brouillon? || @procedure.draft_changed?
|
||
= link_to sanitize_url(@procedure_lien_test), target: :blank, rel: :noopener, class: 'button' do
|
||
%span.icon.in-progress
|
||
Tester
|
||
|
||
- if @procedure.publiee? || @procedure.brouillon?
|
||
= link_to admin_procedure_transfert_path(@procedure), class: 'button' do
|
||
%span.icon.reply
|
||
Envoyer une copie
|
||
|
||
- if !@procedure.publiee? && !@procedure.close? && !@procedure.depubliee?
|
||
= link_to 'Publier', admin_procedure_publication_path(@procedure), class: 'button primary', id: 'publish-procedure-link', data: { disable_with: "Publication..." }
|
||
|
||
- 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..." }
|
||
|
||
- if @procedure.locked? && !@procedure.close?
|
||
= 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
|
||
%span.icon.archive
|
||
Clore
|
||
|
||
- 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?
|
||
.container
|
||
.card.featured
|
||
.card-title
|
||
= t(:has_changes, scope: [:administrateurs, :revision_changes])
|
||
= render partial: 'revision_changes', locals: { changes: @procedure.revision_changes }
|
||
|
||
.container
|
||
%h2.procedure-admin-explanation Indispensable avant publication
|
||
.procedure-grid
|
||
= link_to edit_admin_procedure_path(@procedure), id: 'presentation', class: 'card-admin' do
|
||
%div
|
||
%span.icon.accept
|
||
%p.card-admin-status-accept Validé
|
||
%div
|
||
%p.card-admin-title Présentation
|
||
%p.card-admin-subtitle Logo, nom, description
|
||
%p.button Modifier
|
||
|
||
- if !@procedure.locked? || @procedure.feature_enabled?(:procedure_revisions)
|
||
- @procedure.validate(:publication)
|
||
- error_messages = @procedure.errors.messages_for(:draft_types_de_champ).to_sentence
|
||
|
||
= link_to champs_admin_procedure_path(@procedure), class: 'card-admin', title: error_messages do
|
||
- if @procedure.draft_types_de_champ.empty?
|
||
%div
|
||
%span.icon.clock
|
||
%p.card-admin-status-todo À faire
|
||
- 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é
|
||
%div
|
||
%p.card-admin-title
|
||
%span.badge.baseline= @procedure.draft_types_de_champ.size
|
||
Champs du formulaire
|
||
%p.card-admin-subtitle À remplir par les usagers
|
||
%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
|
||
- 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
|
||
%p.card-admin-subtitle
|
||
- if @procedure.service_id.present?
|
||
= @procedure.service.nom
|
||
- else
|
||
Choix du service administratif
|
||
%p.button= service_button_text
|
||
|
||
= link_to admin_procedure_administrateurs_path(@procedure), id: 'administrateurs', class: 'card-admin' do
|
||
%div
|
||
%span.icon.accept
|
||
%p.card-admin-status-accept Validé
|
||
%div
|
||
%p.card-admin-title
|
||
%span.badge.baseline= @procedure.administrateurs.size
|
||
#{"Administrateur".pluralize(@procedure.administrateurs.size)}
|
||
%p.card-admin-subtitle Gestion de la démarche
|
||
%p.button Modifier
|
||
|
||
= link_to admin_procedure_groupe_instructeurs_path(@procedure), id: 'groupe-instructeurs', class: 'card-admin' do
|
||
- if @procedure.routee? || @procedure.instructeurs.size > 1
|
||
%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
|
||
- if @procedure.routee?
|
||
%span.badge.baseline= @procedure.groupe_instructeurs.size
|
||
- else
|
||
%span.badge.baseline= @procedure.instructeurs.size
|
||
|
||
= @procedure.routee? ? "Groupe Instructeurs" : "#{"Instructeur".pluralize(@procedure.instructeurs.size)}"
|
||
%p.card-admin-subtitle Suivi des dossiers
|
||
%p.button Modifier
|
||
|
||
- 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
|
||
|
||
%h2.procedure-admin-explanation Pour aller plus loin
|
||
.procedure-grid
|
||
|
||
= link_to edit_admin_procedure_attestation_template_path(@procedure), class: 'card-admin' do
|
||
- if @procedure.draft_attestation_template&.activated?
|
||
%div
|
||
%span.icon.accept
|
||
%p.card-admin-status-accept Activée
|
||
- else
|
||
%div
|
||
%span.icon.clock
|
||
%p.card-admin-status-todo Désactivée
|
||
%div
|
||
%p.card-admin-title Attestation
|
||
%p.card-admin-subtitle Délivrance automatique pour les dossiers acceptés
|
||
%p.button Modifier
|
||
|
||
= link_to admin_procedure_experts_path(@procedure), class: 'card-admin' do
|
||
%div
|
||
%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
|
||
%p.button Modifier
|
||
|
||
|
||
= link_to admin_procedure_mail_templates_path(@procedure), class: 'card-admin' do
|
||
%div
|
||
%span.icon.clock
|
||
%p.card-admin-status-todo À configurer
|
||
%div
|
||
%p.card-admin-title Configuration des emails
|
||
%p.card-admin-subtitle Notifications automatiques
|
||
%p.button Modifier
|
||
|
||
- if !@procedure.locked? || @procedure.feature_enabled?(:procedure_revisions)
|
||
- @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
|
||
- if @procedure.draft_types_de_champ_private.present?
|
||
%div
|
||
%span.icon.accept
|
||
%p.card-admin-status-accept Validé
|
||
- elsif error_messages.present?
|
||
%div
|
||
%span.icon.refuse
|
||
%p.card-admin-status-error À modifier
|
||
- 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
|
||
%p.button Modifier
|
||
|
||
= link_to jeton_admin_procedure_path(@procedure), class: 'card-admin' do
|
||
- 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 Entreprise
|
||
%p.card-admin-subtitle Configurer le jeton API entreprise
|
||
%p.button Modifier
|
||
|
||
- if feature_enabled?(:api_particulier)
|
||
= link_to admin_procedure_api_particulier_path(@procedure), class: 'card-admin', id: 'api-particulier' do
|
||
- if @procedure.api_particulier_token.present?
|
||
%div
|
||
%span.icon.accept
|
||
%p.card-admin-status-accept= t('.ready')
|
||
- else
|
||
%div
|
||
%span.icon.clock
|
||
%p.card-admin-status-todo= t('.needs_configuration')
|
||
%div
|
||
%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')
|
||
|
||
= link_to monavis_admin_procedure_path(@procedure), class: 'card-admin' do
|
||
- 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
|
||
%p.button Modifier
|
||
|
||
= 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
|
||
%p.card-admin-subtitle Orienter l'usager suite à l'envoi de son dossier
|
||
%p.button Modifier
|
||
|