engine/app/views/admin/pages/_form.html.haml

71 lines
2.4 KiB
Plaintext

= f.foldable_inputs :name => :information do
= f.input :title
- if not @page.index? and not @page.not_found?
= f.input :parent_id, :as => :select, :collection => parent_pages_options, :include_blank => false
= f.input :slug, :required => false, :hint => @page.slug.blank? ? ' ' : @page.url, :input_html => { :data_url => get_path_admin_pages_url, :disabled => @page.index? || @page.not_found? }
= f.custom_input :published, :css => 'toggle' do
= f.check_box :published
= f.foldable_inputs :name => :meta do
= f.input :keywords
= f.input :description
/ <% f.foldable_inputs :name => :information do %>
/ <%= f.input :title, :required => false %>
/
/ <% f.custom_input :path, :css => 'path' do %>
/ /<%= f.text_field :path %>.html
/ <% end %>
/
/ <% f.custom_input :layout do %>
/ <%= f.select :layout_id, current_site.layouts.all.collect { |l| [l.name, l.id] }, :include_blank => true %>
/ <% end %>
/
/ <%= f.input :keywords, :required => false %>
/ <%= f.input :description, :required => false %>
/
/ <% f.custom_input :cache_expires_in do %>
/ <%= f.select :cache_expires_in, options_for_page_cache_expiration %>
/ <% end %>
/
/ <% f.custom_input :visible, :css => 'checkbox' do %>
/ <%= f.check_box :visible %>
/ <% end %>
/ <% end %>
/
/ <% unless f.object.new_record? %>
/ <div id="page-parts">
/ <div class="jcarousel-control">
/ <% if body_part? %>
/ <a class="part-0 on"><%= t('admin.pages.form.body') %></a><span></span><% end -%><% @page.parts.active.each_with_index do |p, index| -%><a class="part-<%= index + (body_part? ? 1 : 0) %> <%= 'on' if !body_part? && index == 0 %>"><%= p.slug.humanize %></a><span></span>
/ <% end %>
/ </div>
/
/ <div class="wrapper">
/ <ul>
/ <% if body_part? %>
/ <li><code><%= f.text_area :body %></code></li>
/ <% end %>
/
/ <% f.fields_for :parts do |g| %>
/ <% unless g.object.disabled? %>
/ <li><code><%= g.text_area :body, :class => 'big' %></code></li>
/ <% end %>
/ <% end %>
/ </ul>
/ </div>
/ </div>
/
/ <% content_for :head do %>
/ <%= javascript_include_tag 'admin/plugins/iphoneSwitch', 'admin/plugins/checkbox', 'admin/plugins/carousel', 'codemirror/codemirror', 'admin/pages' %>
/ <%= stylesheet_link_tag 'carousel', 'admin/page_parts' %>
/ <% end %>
/ <% end %>