<%- # TODO error_messages_for :page %> <% if @page.new_record? %> <% @_form_url = "/#{I18n.locale}/comatose/pages" %> <% else %> <% @_form_url = comatose_page_path(@page, :locale => I18n.locale) %> <% end %> <% form_for @page, :url => @_form_url, :as => :page do |f| %> <% if show_field? 'keywords' %> <% end %> <% if show_field? 'layout' %> <% end %> <% if show_field? 'parent' %> <% end %> <% if show_field? 'filter' %> <% end %> <% if show_field? 'created_at' %> <% end %>
<%= f.text_field :title, :tabindex => 1, :maxlength => 255, :size => 50 %> <%= link_to_function "More...", "ComatoseEditForm.toggle_extra_fields(this)", :id => 'more-options' %>
<%= f.text_field :slug, :tabindex => 6, :maxlength => 255, :size => 50, :disabled => @root_pages.include?(@page) %>
<%= f.text_field :keywords, :tabindex => 7, :maxlength => 1000, :size => 50 %>
<%= f.text_field :layout, :tabindex => 8, :maxlength => 1000, :size => 50 %>
<% if mode != :new and @root_pages.include? @page %> <% else %> <%= select_from_node(@root_pages, @page.parent_id, @page.id, :tabindex => 9, :label => "Parent") %> <% end %>
<%= f.text_area :body, :rows => 20, :tabindex => 2, :wrap => "off", :nowrap => "nowrap", :spellcheck => "false", :indentwidth => 2, :class => Comatose.config.admin_editor.to_s %>
<%= select_tag 'page[filter_type]', options_for_select(Comatose::TextFilters.all_titles.sort, @page.filter_type || Comatose.config.default_filter), :tabindex => 3, :id => 'page_filter_type' %> Converts plain text into html
<%= f.datetime_select :created_at %>
<% unless @page.updated_at.nil? %>
<% end %> <%= image_tag 'comatose/spinner.gif', :id => 'spinner', :align => 'absmiddle', :style => 'display:none;' %> <%- unless @page.id.blank? %> <%= link_to_function('Preview', "ComatoseEditForm.preview_content('#{preview_comatose_page_path(@page, :locale => 'en')}')", :tabindex => 3, :id => 'preview-btn') if show_field? 'preview' %> <% end %> <%= submit_tag 'Save and Continue', :tabindex => 10 %> <%= submit_tag ((mode == :edit) ? 'Save and Exit' : 'Create Page and Exit'), :tabindex => 11 %> <% if @page.versions.length > 0 %> <%= link_to "Revert", :action => 'versions', :id => @page %> <% end %> or Cancel
<% end %>
Page Preview
Loading Preview...
Close Preview or Back to top
<%= javascript_tag "ComatoseEditForm.init('#{mode.to_s}');" %>