= semantic_form_for [:admin,@slide], :remote => true do |form| 
	.content
		= form.inputs do 
			= form.input :slider_id, :as => :hidden
			= form.input :title, :label => "Titre :" 
	
		
			= form.input :description, :label => "Description courte :", :as => :text, :class => "text_editor"
		
	
		
			%li.string.optional
				%label
					Image :
				%fieldset
					-r = rand(1000000000000000000000000000)	
					=link_to "Modifier cette image", "#", :onclick => "select_image_from_manager('"+r.to_s+"');return false;"
					%br

					-if form.object.image_file
						=image_tag form.object.image_file.file.large.medium.small.thumb.url, :id => "img_"+r.to_s
					-else
						=image_tag "", :id => "img_"+r.to_s



					=form.hidden_field :image_file_id, :class => "inputText", :id => "input_"+r.to_s

		#select_cible_type_bar.bar.dark_blue
			-CibleType.all.each do |cible_type|
				=link_to cible_type.name, new_admin_cible_path(:cible_type => cible_type.slug, :resource_type => "Slide" ), :onclick => "$('#link_content_cible_form').load($(this).attr('href')+' #link_content_cible_form_content');$('#select_cible_type_bar .active').removeClass('active');$(this).addClass('active');return false;",:class => ("active" if cible_type.slug == @slide.cible_type).to_s



		#link_content_cible_form.form2
			#link_content_cible_form_content
				= form.inputs do 
					= form.input :cible_type,:as => :hidden
					= form.input :cible_id,:as => :hidden
				=render :partial => "portlet/link_contents/"+@slide.cible_type.tableize.singularize.to_s+"_form", :locals => {:form => form} if @slide.cible

	
	
	
		
	
	
	.actions
		= form.submit "Sauvegarder"
