%= stylesheet_link_tag "design_temp" %>
<%= javascript_include_tag "design_temp" %>
<%= f.label :title, t('admin.title') %>
<%= f.text_field :title, :class => 'text' %>
<%= f.label :author, t('admin.author') %>
<%= f.text_field :author, :class => 'text' %>
<%= f.label :intro, t('admin.intro') %>
<%= f.text_field :intro, :class => 'text' %>
<%= f.label "layout", t('admin.layout') %>
<% if @design.layout.blank? %>
<%= f.file_field :layout %>
<% else%>
<%= File.basename (Design.all.last.layout.url) %>
<% end %>
<%= f.label "stylesheet", t('admin.stylesheet') %>
<% @design.stylesheets.each do |t| %>
- <%= t.file_filename %>
<%= fields_for "design[stylesheets][]", t, :index => nil do |f| %>
<%= f.hidden_field :id %>
<%= f.hidden_field :to_destroy %>
<%end%>
Del
<% end %>
<%= fields_for "design[stylesheets][]", @design, :index => nil do |f| %>
<%= f.file_field :file ,{:class=>"multi_files",:rtype=>"stylesheets"}%>
<% end %>
<%= f.label "javascript", t('admin.javascript') %>
<% @design.javascripts.each do |t| %>
- <%= t.file_filename %>
<%=fields_for "design[javascripts][]",t,:index=>nil do |f| %>
<%= f.hidden_field :id %>
<%= f.hidden_field :to_destroy %>
<%end%>
Del
<% end %>
<%= fields_for "design[javascripts][]", @design, :index => nil do |f| %>
<%= f.file_field :file,{:class=>"multi_files",:rtype=>"javascripts"} %>
<% end %>
<%= f.label "image", t('admin.image') %>
<% @design.images.each do |t| %>
- <%= t.file_filename %>
<%=fields_for "design[images][]",t,:index=>nil do |f| %>
<%= f.hidden_field :id %>
<%= f.hidden_field :to_destroy %>
<%end%>
Del
<% end %>
<%= fields_for "design[images][]", @design, :index => nil do |f| %>
<%= f.file_field :file ,{:class=>"multi_files",:rtype=>"images"}%>
<% end %>