Created
February 8, 2009 05:31
-
-
Save maxim/60210 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% form_for setup_prototype(@prototype), :html => {:multipart => true} do |f| %> | |
<%= f.error_messages %> | |
<p> | |
<%= f.label :title %><br /> | |
<%= f.text_field :title %> | |
</p> | |
<p> | |
<%= image_tag @prototype.item_view.picture.url(:small) unless @prototype.new_record? %> | |
<%= f.label :item_view %><br /> | |
<% f.fields_for :item_view do |item_view_form| %> | |
<%= item_view_form.file_field :picture %> | |
<% end %> | |
</p> | |
<p> | |
<%= f.label :surface_views %> | |
<% f.fields_for :surface_views do |surface_view_form| %> | |
<div> | |
<%= surface_view_form.label :description, 'Title' %> | |
<%= surface_view_form.text_field :description, :size => 15 %> | |
<%= surface_view_form.label :picture %> | |
<%= surface_view_form.file_field :picture %> | |
<% unless surface_view_form.object.new_record? %> | |
<%= image_tag surface_view_form.object.picture.url(:small) %> | |
<%= surface_view_form.label :_delete, 'Remove:' %> | |
<%= surface_view_form.check_box :_delete %> | |
<% end %> | |
</div> | |
<% end %> | |
</p> | |
<p> | |
<%= f.submit @prototype.new_record? ? "Create" : "Update" %> | |
</p> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment