2018-04-03 14:22:53 +02:00
|
|
|
|
= render partial: 'admin/closed_mail_template_attestation_inconsistency_alert'
|
2016-12-07 17:55:34 +01:00
|
|
|
|
.row.white-back
|
|
|
|
|
#procedure_show
|
2018-08-14 15:17:22 +02:00
|
|
|
|
= render partial: '/admin/procedures/modal_publish'
|
|
|
|
|
= render partial: '/admin/procedures/modal_transfer'
|
|
|
|
|
|
2018-08-28 15:23:45 +02:00
|
|
|
|
- if @procedure.brouillon?
|
|
|
|
|
- if @procedure.gestionnaires.empty? || @procedure.service.nil?
|
2018-06-13 11:33:47 +02:00
|
|
|
|
- missing_elements = []
|
2018-08-28 15:23:45 +02:00
|
|
|
|
- if @procedure.gestionnaires.empty?
|
2018-08-29 22:11:38 +02:00
|
|
|
|
- missing_elements << 'des instructeurs'
|
2018-08-28 15:23:45 +02:00
|
|
|
|
- if @procedure.service.nil?
|
2018-06-13 11:33:47 +02:00
|
|
|
|
- missing_elements << 'un service'
|
2018-09-05 14:48:42 +02:00
|
|
|
|
- message = "Affectez #{missing_elements.join(' et ')} à votre démarche."
|
2018-08-14 15:17:22 +02:00
|
|
|
|
%a.action_button.btn.btn-success#disabled-publish-procedure{ data: { toggle: :tooltip, placement: :bottom }, style: 'float: right; margin-top: 10px;', disabled: true, title: message }
|
2016-12-07 17:55:34 +01:00
|
|
|
|
%i.fa.fa-eraser
|
|
|
|
|
Publier
|
2016-12-14 17:13:40 +01:00
|
|
|
|
- else
|
2018-08-14 15:17:22 +02:00
|
|
|
|
%a.btn.btn-success#publish-procedure{ data: { target: '#publish-modal', toggle: :modal }, type: 'button', style: 'float: right; margin-top: 10px;' }
|
2016-12-07 17:55:34 +01:00
|
|
|
|
%i.fa.fa-eraser
|
|
|
|
|
Publier
|
2016-07-22 11:34:34 +02:00
|
|
|
|
|
2018-08-14 15:17:22 +02:00
|
|
|
|
%a.btn.btn-default#transfer-procedure{ data: { target: '#transfer-modal', toggle: :modal }, type: 'button', style: 'float: right; margin-top: 10px; margin-right: 10px;' }
|
2016-12-07 17:55:34 +01:00
|
|
|
|
%i.fa.fa-exchange
|
2018-04-26 14:40:03 +02:00
|
|
|
|
Envoyer une copie
|
2016-07-22 11:34:34 +02:00
|
|
|
|
|
2018-08-28 15:23:45 +02:00
|
|
|
|
- if @procedure.archivee?
|
2018-08-14 15:17:22 +02:00
|
|
|
|
%a.btn.btn-default#reopen-procedure{ data: { target: '#publish-modal', toggle: :modal }, type: 'button', style: 'float: right; margin-top: 10px; margin-right: 10px;' }
|
|
|
|
|
%i.fa.fa-rocket
|
2016-12-07 17:55:34 +01:00
|
|
|
|
Réactiver
|
|
|
|
|
|
2018-08-28 15:23:45 +02:00
|
|
|
|
- elsif @procedure.publiee?
|
|
|
|
|
= form_tag admin_procedure_archive_path(procedure_id: @procedure.id), method: :put, style: 'float: right; margin-top: 10px;' do
|
2018-08-14 15:17:22 +02:00
|
|
|
|
%button#archive-procedure.btn.btn-small.btn-default.text-info{ type: :button }
|
2016-12-07 17:55:34 +01:00
|
|
|
|
%i.fa.fa-eraser
|
2017-04-06 16:33:53 +02:00
|
|
|
|
Archiver
|
2016-12-07 17:55:34 +01:00
|
|
|
|
#confirm
|
2017-04-06 19:10:25 +02:00
|
|
|
|
%button#valid.btn.btn-small.btn-success{ type: :submit }
|
2016-12-07 17:55:34 +01:00
|
|
|
|
%i.fa.fa-check
|
|
|
|
|
Valider
|
2017-04-06 19:10:25 +02:00
|
|
|
|
%button#cancel.btn.btn-small.btn-danger{ type: :button }
|
2016-12-07 17:55:34 +01:00
|
|
|
|
%i.fa.fa-remove
|
|
|
|
|
Annuler
|
|
|
|
|
|
2018-08-28 15:23:45 +02:00
|
|
|
|
- if @procedure.locked?
|
2017-02-20 15:08:31 +01:00
|
|
|
|
#procedure_locked
|
|
|
|
|
.alert.alert-info
|
2018-09-05 14:48:42 +02:00
|
|
|
|
Cette démarche a été publiée, certains éléments ne peuvent plus être modifiés.
|
2016-12-07 17:55:34 +01:00
|
|
|
|
|
|
|
|
|
%div
|
2018-09-05 14:48:42 +02:00
|
|
|
|
%h3 Lien démarche
|
2018-09-07 12:21:07 +02:00
|
|
|
|
%div{ style: 'margin-top: 30px;' }
|
2018-08-28 15:23:45 +02:00
|
|
|
|
- if @procedure.archivee?
|
2018-09-07 12:21:07 +02:00
|
|
|
|
.alert.alert-info
|
2018-09-05 14:48:42 +02:00
|
|
|
|
Cette démarche est archivée et n’est donc pas accessible par le public.
|
2018-09-07 12:21:07 +02:00
|
|
|
|
- elsif @procedure.publiee?
|
2018-08-28 15:23:45 +02:00
|
|
|
|
= link_to procedure_lien(@procedure), sanitize_url(procedure_lien(@procedure)), target: :blank
|
2018-09-07 12:21:07 +02:00
|
|
|
|
- elsif @procedure.brouillon_avec_lien?
|
|
|
|
|
- if @procedure.gestionnaires.present? && @procedure.service.present?
|
|
|
|
|
= link_to procedure_lien(@procedure), sanitize_url(procedure_lien(@procedure)), target: :blank
|
|
|
|
|
- else
|
|
|
|
|
.alert.alert-info
|
|
|
|
|
Pour pouvoir tester cette démarche, vous devez d’abord lui affecter
|
|
|
|
|
- if @procedure.gestionnaires.empty?
|
|
|
|
|
= link_to("des instructeurs", admin_procedure_instructeurs_path(@procedure))
|
|
|
|
|
- if @procedure.gestionnaires.empty? && @procedure.service.nil?
|
|
|
|
|
et
|
|
|
|
|
- if @procedure.service.nil?
|
|
|
|
|
= link_to("un service", services_path(procedure_id: @procedure))
|
|
|
|
|
\.
|
2016-12-14 17:13:40 +01:00
|
|
|
|
- else
|
2018-09-07 12:21:07 +02:00
|
|
|
|
.alert.alert-info
|
2018-09-05 14:48:42 +02:00
|
|
|
|
Cette démarche n’a pas encore de lien, et n’est donc pas accessible par le public.
|
2016-12-07 17:55:34 +01:00
|
|
|
|
|
|
|
|
|
%br
|
|
|
|
|
%h3 Détails
|
|
|
|
|
|
2017-04-06 17:18:03 +02:00
|
|
|
|
.row{ style: 'margin-right: 3%; margin-left: 3%;' }
|
2017-01-31 10:46:20 +01:00
|
|
|
|
.description.col-xs-6.col-md-3.procedure-description
|
2016-12-07 17:55:34 +01:00
|
|
|
|
%h4.text-info
|
2018-08-28 15:23:45 +02:00
|
|
|
|
= @procedure.libelle
|
2016-12-07 17:55:34 +01:00
|
|
|
|
|
2018-08-28 15:23:45 +02:00
|
|
|
|
= h string_to_html(@procedure.description)
|
2017-01-31 10:46:20 +01:00
|
|
|
|
|
|
|
|
|
.champs.col-xs-6.col-md-3
|
2016-12-07 17:55:34 +01:00
|
|
|
|
%h4.text-info
|
|
|
|
|
Champs
|
|
|
|
|
.badge.progress-bar-info
|
2018-08-28 15:23:45 +02:00
|
|
|
|
= @procedure.types_de_champ.size
|
2017-02-16 13:59:32 +01:00
|
|
|
|
%ul
|
2018-08-28 15:23:45 +02:00
|
|
|
|
- @procedure.types_de_champ.order(:order_place).each do |champ|
|
2017-02-16 13:59:32 +01:00
|
|
|
|
%li= champ.libelle
|
2016-12-07 17:55:34 +01:00
|
|
|
|
|
2017-01-31 10:46:20 +01:00
|
|
|
|
.champs_private.col-xs-6.col-md-3
|
2016-12-22 11:50:03 +01:00
|
|
|
|
%h4.text-info
|
2017-04-26 15:15:38 +02:00
|
|
|
|
Annotations privées
|
2016-12-22 11:50:03 +01:00
|
|
|
|
.badge.progress-bar-info
|
2018-08-28 15:23:45 +02:00
|
|
|
|
= @procedure.types_de_champ_private.size
|
2017-02-16 13:59:32 +01:00
|
|
|
|
%ul
|
2018-08-28 15:23:45 +02:00
|
|
|
|
- @procedure.types_de_champ_private.order(:order_place).each do |champ|
|
2017-02-16 13:59:32 +01:00
|
|
|
|
%li= champ.libelle
|
2016-12-22 11:50:03 +01:00
|
|
|
|
|
2017-04-12 11:12:05 +02:00
|
|
|
|
.pieces-justificatives.col-xs-6.col-md-3
|
2016-12-07 17:55:34 +01:00
|
|
|
|
%h4.text-info
|
2017-03-20 12:03:27 +01:00
|
|
|
|
Pièces jointes
|
2016-12-07 17:55:34 +01:00
|
|
|
|
.badge.progress-bar-info
|
2018-08-28 15:23:45 +02:00
|
|
|
|
= @procedure.types_de_piece_justificative.size
|
|
|
|
|
- @procedure.types_de_piece_justificative.each do |piece_justificative|
|
2016-12-07 17:55:34 +01:00
|
|
|
|
= piece_justificative.libelle
|
|
|
|
|
%br
|
2018-06-01 17:04:09 +02:00
|
|
|
|
|
2018-08-28 15:23:45 +02:00
|
|
|
|
- durees_de_conservation = politiques_conservation_de_donnees(@procedure)
|
2018-06-01 17:04:09 +02:00
|
|
|
|
- if durees_de_conservation.present?
|
|
|
|
|
.row{ style: 'margin-right: 3%; margin-left: 3%;' }
|
|
|
|
|
.col-xs-6.col-md-3
|
|
|
|
|
%h4.text-info Conservation des données
|
|
|
|
|
- durees_de_conservation.each do |text|
|
2018-06-13 09:29:13 +02:00
|
|
|
|
%p= text
|
2018-06-01 17:04:09 +02:00
|
|
|
|
|
2018-08-28 15:23:45 +02:00
|
|
|
|
- if @procedure.publiee_ou_archivee?
|
2018-09-05 14:48:42 +02:00
|
|
|
|
%h3 Supprimer la démarche
|
2017-06-28 18:18:51 +02:00
|
|
|
|
.alert.alert-danger
|
|
|
|
|
%p
|
2018-09-05 14:48:42 +02:00
|
|
|
|
Attention : la suppression d’une démarche est définitive.
|
2018-08-30 23:51:50 +02:00
|
|
|
|
|
2018-08-28 15:23:45 +02:00
|
|
|
|
- dossiers_count = @procedure.dossiers.count
|
2017-06-28 18:18:51 +02:00
|
|
|
|
- if dossiers_count > 0
|
|
|
|
|
%p
|
2018-08-30 23:51:50 +02:00
|
|
|
|
= dossiers_deletion_warning(@procedure)
|
|
|
|
|
|
2017-06-28 18:18:51 +02:00
|
|
|
|
%p.text-right
|
2018-09-05 14:48:42 +02:00
|
|
|
|
= link_to "J'ai compris, je supprime la démarche",
|
2018-08-28 15:23:45 +02:00
|
|
|
|
hide_admin_procedure_path(@procedure),
|
2017-06-28 18:18:51 +02:00
|
|
|
|
method: :post,
|
|
|
|
|
class: "btn btn-danger",
|
2018-09-05 14:48:42 +02:00
|
|
|
|
data: { confirm: "Voulez-vous supprimer la démarche ?", disable: true }
|