Refactor some complex code
This commit is contained in:
parent
2da724d681
commit
f306dd636e
3 changed files with 3 additions and 5 deletions
|
@ -1,3 +1,3 @@
|
||||||
.row.white-back
|
.row.white-back
|
||||||
#previsualisation
|
#previsualisation
|
||||||
= render 'users/description/show'
|
= render partial: 'users/description/show', locals: { previsualisation: true }
|
||||||
|
|
|
@ -30,9 +30,7 @@
|
||||||
.col-lg-8
|
.col-lg-8
|
||||||
= render partial: 'users/description/pieces_justificatives', locals: { dossier: @dossier }
|
= render partial: 'users/description/pieces_justificatives', locals: { dossier: @dossier }
|
||||||
|
|
||||||
-# WTF ?
|
- if !previsualisation
|
||||||
- route = Rails.application.routes.recognize_path(request.referrer)
|
|
||||||
- if !route[:controller].match('admin')
|
|
||||||
%div{ style: 'text-align: right;' }
|
%div{ style: 'text-align: right;' }
|
||||||
%h6 Tous les champs portant un * sont obligatoires.
|
%h6 Tous les champs portant un * sont obligatoires.
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
= render partial: 'show'
|
= render partial: 'show', locals: { previsualisation: false }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue