orbit-basic/app/views/admin/designs/_form.html.erb

61 lines
1.8 KiB
Plaintext
Raw Normal View History

<% content_for :page_specific_css do %>
<%= stylesheet_link_tag "design" %>
<% end %>
<% content_for :page_specific_javascript do %>
<%= javascript_include_tag "design" %>
<% end %>
<p>
2012-09-12 11:12:50 +00:00
<%= f.label :title, t(:title) %>
<%= f.text_field :title, :class => 'text' %>
</p>
<p>
2012-09-12 11:12:50 +00:00
<%= f.label :author, t(:author) %>
<%= f.text_field :author, :class => 'text' %>
</p>
<p>
2012-09-12 11:12:50 +00:00
<%= f.label :intro, t(:intro) %>
<%= f.text_field :intro, :class => 'text' %>
</p>
<p>
2012-09-12 11:12:50 +00:00
<%= f.label "layout", t(:layout) %>
<% if @design.layout.blank? %>
<%= fields_for 'design[layout]' do |f| %>
<%= f.file_field :file %>
<%#= f.hidden_field :to_save, :value => true %>
<% end %>
<% else %>
<%= File.basename (@design.layout.file.url) %>
<% end %>
</p>
<p>
2012-09-12 11:12:50 +00:00
<%= f.label "default_css", t(:default_css) %>
<% if @design.default_css.blank? %>
<%= fields_for 'design[default_css]' do |f| %>
<%= f.file_field :file %>
<%#= f.hidden_field :to_save, :value => true %>
<% end %>
<% else %>
2012-01-05 08:20:51 +00:00
<%= File.basename (@design.default_css.file.url) rescue "" %>
<% end %>
</p>
<p>
2012-09-12 11:12:50 +00:00
<%= f.label :themes, t(:themes) %>
<ul>
<% @design.themes.each do |theme| %>
<%= render :partial => 'design_file', :object => theme, :locals => { :field_name => "themes", :f => f, :classes => "r_destroy, r_edit" } %>
<% end %>
</ul>
<%= render :partial => 'new_design_file', :object => @design.themes.build, :locals => { :field_name => "themes", :f => f, :classes => "r_destroy" } %>
</p>
<p>
<%#= render :partial => 'design_file', :locals => { :object => @design, :field_name => "javascripts", :f => f, :classes => "r_destroy, r_edit" } %>
</p>
<p>
<%#= render :partial => 'design_file', :locals => { :object => @design, :field_name => "images", :f => f, :classes => "r_destroy, r_snapshot" } %>
</p>