<%= error_messages_for :page %> <% form_for :page, @page do |f| %> <% if show_field? 'keywords' %> <% end %> <% if show_field? 'parent' %> <% end %> <% if show_field? 'filter' %> <% end %> <% if show_field? 'created_on' %> <% 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 %>
<% if mode != :new and @root_pages.include? @page %> <% else %> <% end %>
<%= f.text_area :body, :rows=>20, :tabindex=>2 %>
<%= select_tag 'page[filter_type]', options_for_select(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_on %>
<% unless @page.updated_on.nil? %>
<% end %> <%= image_tag 'comatose/spinner.gif', :id=>'spinner', :align=>'absmiddle', :style=>'display:none;' %> <%= button_to_function('Preview', "ComatoseEditForm.preview_content('#{url_for :controller=>controller.controller_name, :action=>'preview', :id=>@page}')", :tabindex=>3, :id=>'preview-btn' ) if show_field? 'preview' %>   <%= submit_tag ((mode == :edit) ? 'Save Changes' : 'Create Page'), :tabindex=>4 %> <% 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}');" %>