2016-12-07 17:55:34 +01:00
.row.white-back
#procedure_show
2017-07-13 15:21:52 +02:00
- if @facade.procedure.brouillon?
2016-12-07 17:55:34 +01:00
- if @facade.procedure.gestionnaires.size == 0
2017-04-26 14:55:14 +02:00
%a.action_button.btn.btn-success#publish-procedure{ style: 'float: right; margin-top: 10px;', disabled: 'disabled', 'data-toggle' => :tooltip, title: 'Vous ne pouvez pas publier une procédure sans qu\'aucun accompagnateur ne soit affecté à celle-ci.' }
2016-12-07 17:55:34 +01:00
%i.fa.fa-eraser
Publier
2016-12-14 17:13:40 +01:00
- else
2017-04-26 14:55:14 +02:00
%a.btn.btn-success#publish-procedure{ "data-target" => "#publish-modal", "data-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
2017-04-06 11:38:44 +02:00
= render partial: '/admin/procedures/modal_publish'
2016-06-09 17:49:38 +02:00
2017-04-06 19:58:11 +02:00
%a#transfer.btn.btn-small.btn-default{ "data-target" => "#transferModal", "data-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
Transférer
2016-07-22 11:34:34 +02:00
2017-04-06 11:38:44 +02:00
= render partial: '/admin/procedures/modal_transfer'
2016-07-22 11:34:34 +02:00
2017-07-13 15:09:25 +02:00
- if @facade.procedure.archivee?
2017-04-12 11:12:05 +02:00
%a#reenable.btn.btn-small.btn-default.text-info{ "data-target" => "#publish-modal", "data-toggle" => "modal", :type => "button", style: 'float: right; margin-top: 10px;' }
2016-06-09 17:49:38 +02:00
%i.fa.fa-eraser
2016-12-07 17:55:34 +01:00
Réactiver
2016-12-14 17:13:40 +01:00
= render partial: '/admin/procedures/modal_publish'
2016-12-07 17:55:34 +01:00
2017-07-13 15:14:28 +02:00
- elsif @facade.procedure.publiee?
2017-07-13 15:09:25 +02:00
= form_tag admin_procedure_archive_path(procedure_id: @facade.procedure.id, archive: !@facade.procedure.archivee?), method: :put, style: 'float: right; margin-top: 10px;' do
2017-04-06 19:10:25 +02:00
%button#archive.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
- if @facade.procedure.locked?
2017-02-20 15:08:31 +01:00
#procedure_locked
.alert.alert-info
Cette procédure a été publiée, certains éléments ne peuvent plus être modifiés.
2016-12-07 17:55:34 +01:00
%div
%h3 Lien procédure
2017-04-06 19:58:11 +02:00
%div{ style: 'margin-left: 3%;' }
2017-07-13 15:20:24 +02:00
- if @facade.procedure.publiee_ou_archivee?
2017-01-31 10:46:20 +01:00
= link_to @facade.procedure.lien, @facade.procedure.lien, target: '_blank'
2016-12-14 17:13:40 +01:00
- else
2016-12-07 17:55:34 +01:00
%b
Cette procédure n'a pas encore été publiée et n'est donc pas accessible par le public.
%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
= @facade.procedure.libelle
2017-07-12 18:17:53 +02:00
= h sanitize(@facade.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
= @facade.procedure.types_de_champ.size
2017-02-16 13:59:32 +01:00
%ul
- @facade.procedure.types_de_champ.order(:order_place).each do |champ|
%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
= @facade.procedure.types_de_champ_private.size
2017-02-16 13:59:32 +01:00
%ul
- @facade.procedure.types_de_champ_private.order(:order_place).each do |champ|
%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
= @facade.procedure.types_de_piece_justificative.size
- @facade.procedure.types_de_piece_justificative.each do |piece_justificative|
= piece_justificative.libelle
%br
%br
%h3
2017-04-06 11:38:44 +02:00
= t('dynamics.admin.procedure.stats.title')
2016-12-07 17:55:34 +01:00
.row
2017-04-06 19:58:11 +02:00
.col-xs-6{ style: 'margin-left: 3%;' }
2016-12-07 17:55:34 +01:00
%h4 Total
%div
= @facade.dossiers_total
%h4.text-danger Attente Accompagnateur
%div
= @facade.dossiers_waiting_gestionnaire_total
2017-04-26 15:13:50 +02:00
%h4.text-info Attente Usager
2016-12-07 17:55:34 +01:00
%div
= @facade.dossiers_waiting_user_total
%h4.text-success Terminé
%div
= @facade.dossiers_termine_total
%h4 Archivé
- unless @facade.dossiers_archived_total == 0
%ul
- @facade.dossiers_archived_by_state_total.each do |dossier|
%li
= dossier.display_state
\:
= dossier.total
- else
%p
0
2017-02-14 17:08:14 +01:00
.col-xs-5
2016-12-07 17:55:34 +01:00
%h4 Non archivés
- if @facade.dossiers_for_pie_highchart.blank?
Aucune statistique pour le moment
2016-12-14 17:13:40 +01:00
- else
2017-04-06 11:38:44 +02:00
= pie_chart @facade.dossiers_for_pie_highchart
2017-06-28 18:18:51 +02:00
2017-07-13 15:20:24 +02:00
- if @facade.procedure.publiee_ou_archivee?
2017-06-28 18:18:51 +02:00
%h3 Supprimer la procédure
.alert.alert-danger
%p
Attention : la suppression d'une procédure est définitive.
- dossiers_count = @facade.procedure.dossiers.count
- if dossiers_count > 0
%p
= pluralize(dossiers_count, "dossier est rattaché", "dossiers sont rattachés")
à cette procédure, la suppression de cette procédure entrainera également leur suppression.
%p.text-right
= link_to "J'ai compris, je supprime la procédure",
hide_admin_procedure_path(@facade.procedure),
method: :post,
class: "btn btn-danger",
data: { confirm: "Voulez-vous supprimer la procédure ?", disable_with: "Suppression..." }