.header.element
  = form.label :name
  = form.text_field :name

#item
  = form.error_messages

  .element
    %table#parameters.inspector
      %caption
        Parameters
      %thead
        %tr
          %th.key Key
          %th.value Value
      %tbody
        - if form.object.parameters.blank?
          = render :partial => 'parameters/parameter_input', :object => form.object.parameters.build
        - else
          = render :partial => 'parameters/parameter_input', :collection => form.object.parameters
      %tfoot
        %tr
          %td{:colspan => 2}
            = link_to_function("Add Parameter", :class => "add button") { |page|  page.insert_html :bottom, 'parameters', :partial => 'parameters/parameter_input', :object => form.object.parameters.build }
  .element.node_classes
    = label_tag 'Node Classes'
    = text_field_tag 'node_group[node_class_names][]', '', :id => 'node_class_names'
    %ul#existing_node_classes
      - form.object.node_classes.each do |klass|
        %li= klass.name

  .element.node_groups
    = label_tag 'Node Groups'
    = text_field_tag 'node_group[node_group_names][]', '', :id => 'node_group_names'
    %ul#existing_node_groups
      - form.object.node_groups.each do |group|
        %li= group.name

