2016-12-07 17:55:34 +01:00
.row.white-back
#procedure_show
-unless @facade.procedure.published?
- if @facade.procedure.gestionnaires.size == 0
2016-12-14 17:13:40 +01:00
%a.action_button.btn.btn-success{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.', id: 'publish-procedure'}
2016-12-07 17:55:34 +01:00
%i.fa.fa-eraser
Publier
2016-12-14 17:13:40 +01:00
- else
%a.btn.btn-success{"data-target" => "#publishModal", "data-toggle" => "modal", :type => "button", style:'float: right; margin-top: 10px', id: 'publish-procedure'}
2016-12-07 17:55:34 +01:00
%i.fa.fa-eraser
Publier
2016-07-22 11:34:34 +02:00
2016-12-07 17:55:34 +01:00
=render partial: '/admin/procedures/modal_publish'
2016-06-09 17:49:38 +02:00
2016-12-07 17:55:34 +01: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'}
%i.fa.fa-exchange
Transférer
2016-07-22 11:34:34 +02:00
2016-12-07 17:55:34 +01:00
=render partial: '/admin/procedures/modal_transfer'
2016-07-22 11:34:34 +02:00
2016-12-14 17:13:40 +01:00
- if @facade.procedure.archived?
2016-12-07 17:55:34 +01:00
%a#reenable.btn.btn-small.btn-default.text-info{"data-target" => "#publishModal", "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
2016-12-14 17:13:40 +01:00
- elsif @facade.procedure.published?
2016-12-07 17:55:34 +01:00
= form_tag admin_procedure_archive_path(procedure_id: @facade.procedure.id, archive: !@facade.procedure.archived?), method: :put, style:'float: right; margin-top: 10px' do
%button#archive.btn.btn-small.btn-default.text-info{type: :button}
%i.fa.fa-eraser
= 'Archiver'
#confirm
%button#valid.btn.btn-small.btn-success{type: :submit}
%i.fa.fa-check
Valider
%button#cancel.btn.btn-small.btn-danger{type: :button}
%i.fa.fa-remove
Annuler
- if @facade.procedure.locked?
#procedure_locked.center
%h5
.label.label-info La procédure ne peut plus être modifiée car elle a été publiée
%div
%h3 Lien procédure
%div{style:'margin-left:3%'}
2016-12-14 17:13:40 +01:00
- if @facade.procedure.archived?
2016-12-07 17:55:34 +01:00
%b
Cette procédure a été archivée et n'est plus accessible par le public.
2016-12-14 17:13:40 +01:00
- elsif @facade.procedure.published?
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
.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
= h @facade.procedure.description.html_safe
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
- @facade.procedure.types_de_champ.order(:order_place).each do |champ|
= champ.libelle
%br
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
Champs privés
.badge.progress-bar-info
= @facade.procedure.types_de_champ_private.size
- @facade.procedure.types_de_champ_private.order(:order_place).each do |champ|
= champ.libelle
%br
2017-01-31 10:46:20 +01:00
.pieces_justificatives.col-xs-6.col-md-3
2016-12-07 17:55:34 +01:00
%h4.text-info
Pièces justificatives
.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
=t('dynamics.admin.procedure.stats.title')
.row
2016-12-23 16:58:06 +01:00
.col-md-6.col-sm-6.col-xs-6.col-lg-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
%h4.text-info Attente Utilisateur
%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
2016-12-23 16:58:06 +01:00
.col-md-5.col-sm-5.col-xs-5.col-lg-5
2016-12-07 17:55:34 +01:00
%h4 Non archivés
= javascript_include_tag "https://code.highcharts.com/highcharts.js", "chartkick"
- if @facade.dossiers_for_pie_highchart.blank?
Aucune statistique pour le moment
2016-12-14 17:13:40 +01:00
- else
2016-12-07 17:55:34 +01:00
=pie_chart @facade.dossiers_for_pie_highchart