2011-07-19 10:31:53 +00:00
|
|
|
<%= stylesheet_link_tag "design_temp" %>
|
2011-07-22 07:54:38 +00:00
|
|
|
<%= javascript_include_tag "design_temp" %>
|
2011-07-12 08:02:41 +00:00
|
|
|
<p>
|
|
|
|
<%= f.label :title, t('admin.title') %>
|
|
|
|
<%= f.text_field :title, :class => 'text' %>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<%= f.label :author, t('admin.author') %>
|
|
|
|
<%= f.text_field :author, :class => 'text' %>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<%= f.label :intro, t('admin.intro') %>
|
|
|
|
<%= f.text_field :intro, :class => 'text' %>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<%= f.label "layout", t('admin.layout') %>
|
2011-07-14 00:48:42 +00:00
|
|
|
<% if @design.layout.blank? %>
|
2011-07-12 08:02:41 +00:00
|
|
|
<%= f.file_field :layout %>
|
|
|
|
<% else%>
|
|
|
|
<%= File.basename (Design.all.last.layout.url) %>
|
|
|
|
<% end %>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
<p>
|
2011-07-22 07:54:38 +00:00
|
|
|
<%= f.label "stylesheet", t('admin.stylesheet') %>
|
|
|
|
<ul>
|
|
|
|
<% @design.stylesheets.each do |t| %>
|
|
|
|
<li class="r_destroy r_edit" ><%= t.file_filename %>
|
|
|
|
<%= fields_for "design[stylesheets][]", t, :index => nil do |f| %>
|
|
|
|
<%= f.hidden_field :id %>
|
|
|
|
<%= f.hidden_field :to_destroy %>
|
|
|
|
<%end%>
|
|
|
|
<a class="remove_mark" href="#">Del</a></li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
<%= fields_for "design[stylesheets][]", @design, :index => nil do |f| %>
|
|
|
|
<%= f.file_field :file ,{:class=>"multi_files",:rtype=>"stylesheets"}%>
|
|
|
|
<% end %>
|
2011-07-12 08:02:41 +00:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
2011-07-22 07:54:38 +00:00
|
|
|
<%= f.label "javascript", t('admin.javascript') %>
|
|
|
|
<ul>
|
|
|
|
<% @design.javascripts.each do |t| %>
|
|
|
|
<li class="r_destroy r_edit" ><%= t.file_filename %>
|
|
|
|
<%=fields_for "design[javascripts][]",t,:index=>nil do |f| %>
|
|
|
|
<%= f.hidden_field :id %>
|
|
|
|
<%= f.hidden_field :to_destroy %>
|
|
|
|
<%end%>
|
|
|
|
<a class="remove_mark" href="#">Del</a></li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
<%= fields_for "design[javascripts][]", @design, :index => nil do |f| %>
|
|
|
|
<%= f.file_field :file,{:class=>"multi_files",:rtype=>"javascripts"} %>
|
|
|
|
<% end %>
|
2011-07-12 08:02:41 +00:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
2011-07-22 07:54:38 +00:00
|
|
|
<%= f.label "image", t('admin.image') %>
|
|
|
|
<ul>
|
|
|
|
<% @design.images.each do |t| %>
|
|
|
|
<li class="r_destroy r_snapshot" path="<%= t.file %>" item_id="<%=t.id %>"><%= t.file_filename %>
|
|
|
|
<%=fields_for "design[images][]",t,:index=>nil do |f| %>
|
|
|
|
<%= f.hidden_field :id %>
|
|
|
|
<%= f.hidden_field :to_destroy %>
|
|
|
|
<%end%>
|
|
|
|
<a class="remove_mark" href="#">Del</a></li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
<%= fields_for "design[images][]", @design, :index => nil do |f| %>
|
|
|
|
<%= f.file_field :file ,{:class=>"multi_files",:rtype=>"images"}%>
|
|
|
|
<% end %>
|
2011-07-12 08:02:41 +00:00
|
|
|
</p>
|