<%= form_for [:admin, @page] do |f| %> <%= render :partial => "mcms_pages/admin/pages/error_messages", :locals => { :object => f.object, :include_object_name => true } %>
<%= f.hidden_field :layout_id, :value => "#{@layout}" %>
<%= f.label :title, "Title of the Page:" %> <%= f.text_field :title, :title => "This will be the title of your page" %>
<%= f.label :body, "Content of the Page:" %> <% if controller.action_name == 'new' or controller.action_name == 'create'%> <%= render 'mcms_pages/admin/pages/page_part_form', :f => f %> <% else %> <%= render 'mcms_pages/admin/pages/page_part_edit_form', :f => f %> <% end %>
<%= f.label :parent_id, "Parent Page(If Any):" %> <%= f.select(:parent_id, nested_set_options(Page, @page) {|p| p.title }, {:include_blank => 'Select Page'}) %>
<%= f.label :link_url, "Forward this page to another website or page: " %> <%= f.text_field :link_url, :title => "Use full url, e.g.- http://www.google.com" %>
<%= f.check_box :show_in_menu %> <%= f.label :show_in_menu %>
<%= f.check_box :published %> <%= f.label :published, "Publish this page" %>
<%= f.submit %> <%= f.submit :value => "Preview", :id => "preview-submit" %>
<%= render 'mcms_pages/admin/pages/form.js'%> <% end %>