Disable publication (on UI) if procedure does not have gestionnaire
This commit is contained in:
parent
3c400da89d
commit
7425a0be59
1 changed files with 9 additions and 4 deletions
|
@ -2,13 +2,18 @@
|
|||
=render partial: 'head', locals: {active: 'Informations'}
|
||||
|
||||
-unless @facade.procedure.published?
|
||||
%a#publish.btn.btn-success{"data-target" => "#publishModal", "data-toggle" => "modal", :type => "button", style:'float: right; margin-top: 10px'}
|
||||
%i.fa.fa-eraser
|
||||
Publier
|
||||
- if @facade.procedure.gestionnaires.size == 0
|
||||
%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.'}
|
||||
%i.fa.fa-eraser
|
||||
Publier
|
||||
-else
|
||||
%a#publish.btn.btn-success{"data-target" => "#publishModal", "data-toggle" => "modal", :type => "button", style:'float: right; margin-top: 10px'}
|
||||
%i.fa.fa-eraser
|
||||
Publier
|
||||
|
||||
=render partial: '/admin/procedures/modal_publish'
|
||||
|
||||
%a#transfer.btn.btn-small.btn-default{"data-target" => "#transferModal", "data-toggle" => "modal", :type => "button", style:'float: right; margin-top: 10px'}
|
||||
%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
|
||||
|
||||
|
|
Loading…
Reference in a new issue