remove useless view

This commit is contained in:
Tanguy PATTE 2015-11-19 19:03:32 +01:00
parent 37b4823e9a
commit 90c7e85980
5 changed files with 0 additions and 162 deletions

View file

@ -1 +0,0 @@
$("#champs").html("<%= escape_javascript(render partial: 'types_de_champ/liste', locals: { types_de_champ: @types_de_champ } ) %>");

View file

@ -4,5 +4,3 @@
= form_for @procedure, url: {controller: 'admin/procedures', action: :create} do |f|
=render partial: 'informations', locals: {f: f}
=f.submit 'Valider', class: 'btn btn-info', style: 'float:right'
%br
%br

View file

@ -1,76 +0,0 @@
/ - types_de_champ.each do |type_de_champ|
= f.fields_for :types_de_champ, types_de_champ, remote: true do |ff|
.form-inline
.form-group
%h4 Libellé
= ff.text_field :libelle, class: 'form-control libelle', placeholder: 'Libellé'
.form-group
%h4 Type
= ff.select :type_champ, TypeDeChamp.type_champ, {}, {class: 'form-control type_champ'}
.form-group
%h4 Description
= ff.text_area :description, class: 'form-control description', placeholder: 'Description'
.form-group
= ff.hidden_field :order_place
= ff.hidden_field :id
/ .form-group.order_type_de_champ_button{id: "order_type_de_champ_#{type_de_champ.id || index}_button", style: ("display:none" if type_de_champ.id.nil?)}
.form-group
%br &nbsp;
%button.form-control.btn.btn-default.button_up.fa.fa-chevron-up{type: 'button'}
/ , id: "order_type_de_champ_#{type_de_champ.id || index}_up_procedure"}
%button.form-control.btn.btn-default.button_down.fa.fa-chevron-down{type: 'button'}
/ , id: "order_type_de_champ_#{type_de_champ.id || index}_down_procedure"}
/ .form-group{ id: "delete_type_de_champ_#{type_de_champ.id || index}_button", style: ("display:none" if type_de_champ.id.nil?)}
- unless ff.object.id.nil?
.form-group
%br &nbsp;
= link_to("Delete", admin_procedure_type_de_champ_path(@procedure, ff.object.id), method: :delete, remote: true)
/ %button.form-control.btn.btn-danger.fa.fa-trash-o{type: 'button'}
/ , id: "delete_type_de_champ_#{type_de_champ.id || index}_procedure"}
-if ff.object.id.nil?
.form-group#add_type_de_champ_button
%br &nbsp;
= ff.submit('Ajouter', :'data-remote' => true)
%button.form-control.btn.btn-success#add_type_de_champ_procedure{type: 'button'} Ajouter
/ - types_de_champ.each do |type_de_champ|
/ - type_de_champ.id.nil? ? object_for = "new_type_de_champ[#{index}]" : object_for = 'types_de_champ[]'
/ = f.fields_for object_for, type_de_champ do |ff|
/ .form-inline{id:"type_de_champ_#{type_de_champ.id || index}", class: 'type_de_champ', style: 'padding-bottom:8px'}
/ .form-group{ style: 'padding-right: 2%' }
/ %h4 Libellé
/ =ff.text_field :libelle, class: 'form-control libelle', placeholder: 'Libellé'
/ .form-group{ style: 'padding-right: 2%' }
/ %h4 Type
/ =ff.select :type_champ, TypeDeChamp.type_champ, {}, {class: 'form-control type_champ'}
/ .form-group{ style: 'padding-right: 2%' }
/ %h4 Description
/ =ff.text_area :description, class: 'form-control description', placeholder: 'Description'
/ -if order_place.nil?
/ =ff.hidden_field :order_place, class: 'order_place'
/ -else
/ =ff.hidden_field :order_place, value: order_place, class: 'order_place'
/ =ff.hidden_field '_destroy', value: 'false', class: 'destroy'
/ .form-group.order_type_de_champ_button{id: "order_type_de_champ_#{type_de_champ.id || index}_button", style: ("display:none" if type_de_champ.id.nil?)}
/ %br &nbsp;
/ %button.form-control.btn.btn-default.button_up.fa.fa-chevron-up{type: 'button', id: "order_type_de_champ_#{type_de_champ.id || index}_up_procedure"}
/ %button.form-control.btn.btn-default.button_down.fa.fa-chevron-down{type: 'button', id: "order_type_de_champ_#{type_de_champ.id || index}_down_procedure"}
/ .form-group{ id: "delete_type_de_champ_#{type_de_champ.id || index}_button", style: ("display:none" if type_de_champ.id.nil?)}
/ %br &nbsp;
/ %button.form-control.btn.btn-danger.fa.fa-trash-o{type: 'button', id: "delete_type_de_champ_#{type_de_champ.id || index}_procedure"}
/ -if type_de_champ.id.nil?
/ .form-group#add_type_de_champ_button
/ %br &nbsp;
/ %button.form-control.btn.btn-success#add_type_de_champ_procedure{type: 'button'} Ajouter

View file

@ -1,11 +0,0 @@
#liste_champ
-unless @types_de_champ.nil?
=render partial: 'admin/procedures/types_de_champ/form', locals:{ types_de_champ: @types_de_champ, order_place: nil, f: f, procedure: procedure }
#liste_delete_champ
#new_type_de_champ
=render partial: 'admin/procedures/types_de_champ/form', locals:{ types_de_champ: [TypeDeChamp.new], index: (@types_de_champ.nil? || @types_de_champ.last.nil? ? 0 : @procedure.types_de_champ.last.id+1), order_place: (@types_de_champ.nil? ? 1 : @types_de_champ.size+1), f: f, procedure: procedure }
%script{ type:'text/javascript' }
="var types_de_champ_index = #{(@types_de_champ.nil? || @types_de_champ.last.nil? ? 0 : @procedure.types_de_champ.last.id+1)}"