Editing Content

* Required Fields

<%= form_for(@node, :as => :node, :url => noodall_admin_node_path(@node), :html => {:method => :put, :id => "node-form"}) do |f| %> <%= f.error_messages %>

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

  <%= f.label :name %>
<%= f.text_field :name %>

<%= render :partial => "admin/nodes/#{@node.class.name.underscore}", :locals => { :f => f } %>

  <%= f.label :description, "Short Description" %>
<%= f.text_area :description, :class => 'description' %>

  <%= f.label :keywords, "Keywords" %>
<%= f.text_field :keywords, :class => "keywords-completer" %>
Popular Tags: <%= popular_tags %>

<%= f.submit 'Publish', :title => "Save and put live", :class => 'publish', :id => "publish", :name => 'node[publish]' if can_publish?(@node) %> <%= f.submit 'Draft', :title => "Save this to edit later", :name => "draft", :class => 'draft' %> <%= link_to 'Versions', noodall_admin_node_versions_path(@node), :title => "View document history", :id => "versions-button" %> <%= f.submit 'Hide', :title => "Temporarily hide this page", :name => 'node[hide]', :id => 'hide' %> <%= link_to 'Cancel', @node.root? ? noodall_admin_nodes_path : noodall_admin_node_nodes_path(@node.parent), :class => 'cancel' %>
<% if can_publish?(@node) %>
Advanced

<%= f.label :published_at, "Publish at" %>
<%= f.datetime_select :published_at, :include_blank => true %>

<%= f.label :published_to, "Publish until" %>
<% # Remove select for far future dates @node.published_to = nil unless @node.published_to.nil? or @node.published_to < 5.years.from_now %> <%= f.datetime_select :published_to, :include_blank => true %>

<%= f.label :version_message %>
<%= f.text_field :version_message -%>

<% if current_user.admin? -%>
  User Permission
Action Groups
<%= f.label :updatable_groups_list, "Update" %> <%= f.text_field :updatable_groups_list, :class => "groups-completer" %>
<%= f.label :publishable_groups_list, "Publish" %> <%= f.text_field :publishable_groups_list, :class => "groups-completer" %>
<%= f.label :destroyable_groups_list, "Delete" %> <%= f.text_field :destroyable_groups_list, :class => "groups-completer" %>
<%= f.label :viewable_groups_list, "View" %> <%= f.text_field :viewable_groups_list, :class => "groups-completer" %>
<% end -%>
<% unless @node.in_site_map? %>

Parent Content <%= @node.root? ? "Root" : @node.parent.title %> Edit <%= f.hidden_field :parent, :value => @node.parent_id %> <%= hidden_field_tag :parent_types, @node.class.parent_classes.join(','), :disabled => true %>

  <%= f.label :permalink, 'Page Url' %>
<%= f.text_field :permalink %>

<% end %>

  <%= f.label :browser_title, 'Browser Title' %>
<%= f.text_field :browser_title %>

<%= f.label :version_message %>
<%= f.text_field :version_message -%>

<% end -%>
<% unless @node.class.slots_count == 0 %>

Page Components

  <%= yield :component_table %> <% if can_change_templates?(@node) %> <%= link_to "Change Template", change_template_noodall_admin_node_path(@node), :class => 'change' %> <% end -%>
    <% Noodall::Component.possible_slots.each do |type| @node.class.send("#{type}_slots_count").to_i.times do |index| %>
  1. <%= slot_link(@node,type,index) %> <%= slot_form(@node,type,index) %>
  2. <% end -%> <% end -%>
<% end -%> <% end %>