input qi_image_select
This commit is contained in:
parent
55bdbb93b8
commit
53d5920e48
@ -7,24 +7,10 @@
|
|||||||
= form.input :slug, :label => "Slug :"
|
= form.input :slug, :label => "Slug :"
|
||||||
|
|
||||||
= form.input :description, :label => "Description courte :", :as => :text
|
= form.input :description, :label => "Description courte :", :as => :text
|
||||||
|
|
||||||
|
= form.input :image_file_id, :as => :qi_image_select, :label => "Image :"
|
||||||
|
|
||||||
|
|
||||||
%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
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user