demarches-normaliennes/app/views/admin/procedures/show.html.haml

115 lines
No EOL
3.5 KiB
Text

#procedure_show
%h2.text-info
=@facade.procedure.libelle
%br
%ul.nav.nav-tabs
%li.active
= link_to('Informations', admin_procedure_path(@facade.procedure))
%li{ class: ('disabled' if @facade.procedure.locked?) }
= link_to_unless(@facade.procedure.locked?, 'Description', edit_admin_procedure_path(@facade.procedure)) do
= link_to('Description', '#')
%li{ class: ('disabled' if @facade.procedure.locked?) }
= link_to_unless(@facade.procedure.locked?, 'Champs', admin_procedure_types_de_champ_path(@facade.procedure)) do
= link_to('Champs', '#')
%li{ class: ('disabled' if @facade.procedure.locked?) }
= link_to_unless(@facade.procedure.locked?, 'Pièces justificatives', admin_procedure_pieces_justificatives_path(@facade.procedure)) do
= link_to('Pièces justificatives', '#')
%li{style:'float:right'}
= form_tag admin_procedure_archive_path(procedure_id: @facade.procedure.id, archive: !@facade.procedure.archived?), method: :put do
%button#archive.btn.btn-nav.text-info{type: :button}
%i.fa.fa-eraser
- if @facade.procedure.archived
= 'Réactiver'
- else
= 'Archiver'
#confirm
%button#valid.btn.btn-nav.text-success{type: :submit}
%i.fa.fa-check
Valider
%button#cancel.btn.btn-nav.text-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 un usagé a déjà déposé un dossier
%div
%h3 Lien procédure
%div{style:'margin-left:3%'}
= @facade.procedure.lien
%br
%h3 Détails
.row{style:'margin-right:3%; margin-left:3%;'}
.description.col-md-4.col-lg-4
%h4.text-info
= @facade.procedure.libelle
= @facade.procedure.description
.champs.col-md-4.col-lg-4
%h4.text-info
Champs
.badge.progress-bar-info
= @facade.procedure.types_de_champ.size
- @facade.procedure.types_de_champ.each do |champ|
= champ.libelle
%br
.pieces_justificatives.col-md-4.col-lg-4
%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 Dossiers
.row
.col-md-6.col-lg-6{style:'margin-left:3%'}
%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
.col-md-5.col-lg-5
%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
-else
=pie_chart @facade.dossiers_for_pie_highchart