Admin Procedure Show: simple cleaning
This commit is contained in:
parent
6b8a878ec1
commit
abccdab6ab
1 changed files with 21 additions and 19 deletions
|
@ -1,8 +1,10 @@
|
|||
- procedure = @facade.procedure
|
||||
|
||||
= render partial: 'admin/closed_mail_template_attestation_inconsistency_alert'
|
||||
.row.white-back
|
||||
#procedure_show
|
||||
- if @facade.procedure.brouillon?
|
||||
- if @facade.procedure.gestionnaires.size == 0
|
||||
- if procedure.brouillon?
|
||||
- if procedure.gestionnaires.size == 0
|
||||
%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.' }
|
||||
%i.fa.fa-eraser
|
||||
Publier
|
||||
|
@ -19,15 +21,15 @@
|
|||
|
||||
= render partial: '/admin/procedures/modal_transfer'
|
||||
|
||||
- if @facade.procedure.archivee?
|
||||
- if procedure.archivee?
|
||||
%a#reenable.btn.btn-small.btn-default.text-info{ "data-target" => "#publish-modal", "data-toggle" => "modal", :type => "button", style: 'float: right; margin-top: 10px;' }
|
||||
%i.fa.fa-eraser
|
||||
Réactiver
|
||||
|
||||
= render partial: '/admin/procedures/modal_publish'
|
||||
|
||||
- elsif @facade.procedure.publiee?
|
||||
= form_tag admin_procedure_archive_path(procedure_id: @facade.procedure.id, archive: !@facade.procedure.archivee?), method: :put, style: 'float: right; margin-top: 10px;' do
|
||||
- elsif procedure.publiee?
|
||||
= form_tag admin_procedure_archive_path(procedure_id: procedure.id, archive: !procedure.archivee?), 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
|
||||
|
@ -39,7 +41,7 @@
|
|||
%i.fa.fa-remove
|
||||
Annuler
|
||||
|
||||
- if @facade.procedure.locked?
|
||||
- if procedure.locked?
|
||||
#procedure_locked
|
||||
.alert.alert-info
|
||||
Cette procédure a été publiée, certains éléments ne peuvent plus être modifiés.
|
||||
|
@ -47,8 +49,8 @@
|
|||
%div
|
||||
%h3 Lien procédure
|
||||
%div{ style: 'margin-left: 3%;' }
|
||||
- if @facade.procedure.publiee_ou_archivee?
|
||||
= link_to @facade.procedure.lien, sanitize_url(@facade.procedure.lien), target: :blank
|
||||
- if procedure.publiee_ou_archivee?
|
||||
= link_to procedure.lien, sanitize_url(procedure.lien), target: :blank
|
||||
- else
|
||||
%b
|
||||
Cette procédure n'a pas encore été publiée et n'est donc pas accessible par le public.
|
||||
|
@ -59,34 +61,34 @@
|
|||
.row{ style: 'margin-right: 3%; margin-left: 3%;' }
|
||||
.description.col-xs-6.col-md-3.procedure-description
|
||||
%h4.text-info
|
||||
= @facade.procedure.libelle
|
||||
= procedure.libelle
|
||||
|
||||
= h sanitize(@facade.procedure.description)
|
||||
= h sanitize(procedure.description)
|
||||
|
||||
.champs.col-xs-6.col-md-3
|
||||
%h4.text-info
|
||||
Champs
|
||||
.badge.progress-bar-info
|
||||
= @facade.procedure.types_de_champ.size
|
||||
= procedure.types_de_champ.size
|
||||
%ul
|
||||
- @facade.procedure.types_de_champ.order(:order_place).each do |champ|
|
||||
- procedure.types_de_champ.order(:order_place).each do |champ|
|
||||
%li= champ.libelle
|
||||
|
||||
.champs_private.col-xs-6.col-md-3
|
||||
%h4.text-info
|
||||
Annotations privées
|
||||
.badge.progress-bar-info
|
||||
= @facade.procedure.types_de_champ_private.size
|
||||
= procedure.types_de_champ_private.size
|
||||
%ul
|
||||
- @facade.procedure.types_de_champ_private.order(:order_place).each do |champ|
|
||||
- procedure.types_de_champ_private.order(:order_place).each do |champ|
|
||||
%li= champ.libelle
|
||||
|
||||
.pieces-justificatives.col-xs-6.col-md-3
|
||||
%h4.text-info
|
||||
Pièces jointes
|
||||
.badge.progress-bar-info
|
||||
= @facade.procedure.types_de_piece_justificative.size
|
||||
- @facade.procedure.types_de_piece_justificative.each do |piece_justificative|
|
||||
= procedure.types_de_piece_justificative.size
|
||||
- procedure.types_de_piece_justificative.each do |piece_justificative|
|
||||
= piece_justificative.libelle
|
||||
%br
|
||||
%br
|
||||
|
@ -123,19 +125,19 @@
|
|||
- else
|
||||
= pie_chart @facade.dossiers_for_pie_highchart
|
||||
|
||||
- if @facade.procedure.publiee_ou_archivee?
|
||||
- if procedure.publiee_ou_archivee?
|
||||
%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
|
||||
- dossiers_count = 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),
|
||||
hide_admin_procedure_path(procedure),
|
||||
method: :post,
|
||||
class: "btn btn-danger",
|
||||
data: { confirm: "Voulez-vous supprimer la procédure ?", disable_with: "Suppression..." }
|
||||
|
|
Loading…
Reference in a new issue