<% content_for :header do %> <%= javascript_include_tag 'lightwindow' %> <%= stylesheet_link_tag 'lightwindow' %> <% end -%>

<%= @page.new_record? ? 'New' : 'Editing a' %> Page

<% form_for([:admin, @page], :html => { :id => 'has-assets-form' }) do |f| %> <%= f.error_messages %> <%= f.hidden_field :parent_id %> <% if @page.lock_level < 3 %>

<%= f.label :title, 'Title*' %>
<%= f.text_field :title, :class => 'title' %>

<% else %>

<%= f.label :title %>
<%= @page.title %> (locked)

<% end %> <% if @page.lock_level < 2 %>

<%= f.label :permalink, "URL" %>
<%= root_url %><%= f.text_field :permalink %>

URLs are most efficient if they closely reflect the title or main subject of this content. Changing the permalink will make search engines think it is a different page resulting in a loss of page rank, only change if very necessary. Leave blank to use the title.

<% else %>

<%= f.label :permalink, "URL" %>
<%= root_url %><%= @page.permalink %> (locked)

<% end %>

<%= f.label :description, "Description for search engines*" %>
<%= f.text_area :description, "rows" => 4 %>

<%= f.label :tag_list, "Keywords (used by search engines) & Tags - comma separated*" %>
<%= f.text_field :tag_list, :class => 'long' %>

<%= f.label :template %> <%= f.select :template, get_template_names.collect{|t| [ t.titleize, t ] } %>

<%= f.label :body, 'Body*' %>
<%= f.text_area 'body', :class => 'editor' %>

<%= publish_select(f) %>

<%= preview_link(@page) %> <%= f.submit 'Publish', :name => 'page[publish]' %> <%= f.submit 'Save as draft', :name => 'page[hide]' %> or <%= link_to 'Cancel', admin_articles_path %>

<% end %> <% content_for :sub_content do %> <%= asset_list(@page) %>

Asset Library

<%= asset_browser(true) %>

Asset Upload

<%= asset_upload_form %> <%= flickr_select %> <% end %>