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

49 lines
1.3 KiB
Plaintext

<% content_for :page_specific_css do %>
<%= stylesheet_link_tag "design_temp" %>
<% end %>
<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') %>
<% 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>
<%= f.label "default_css", t('admin.default_css') %>
<% if @design.default_css.blank? %>
<%= f.file_field :default_css %>
<% else %>
<%= File.basename (@design.default_css.url) %>
<% end %>
</p>
<p>
<%= render :partial => 'design_file', :locals => { :object => @design, :field_name => "themes", :f => f, :classes => "r_destroy, r_editable" } %>
</p>
<p>
<%= render :partial => 'design_file', :locals => { :object => @design, :field_name => "javascripts", :f => f, :classes => "r_destroy, r_editable" } %>
</p>
<p>
<%= render :partial => 'design_file', :locals => { :object => @design, :field_name => "images", :f => f, :classes => "r_destroy, r_snapshot" } %>
</p>