.header
  = form.label 'Hostname', :name
  = form.text_field :name

#item
  = form.error_messages

  .element.textarea
    = form.label :description
    = form.text_area :description, :rows => 4

  .element
    %h3 Parameters
    %table#parameters.inspector
      %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 'Classes'
    = hidden_field_tag 'node[node_class_names][]', '   '
    = text_field_tag 'node[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 'Groups'
    = hidden_field_tag 'node[node_group_names][]', '   '
    = text_field_tag 'node[node_group_names][]', '', :id => 'node_group_names'
    %ul#existing_node_groups
      - form.object.node_groups.each do |group|
        %li= group.name

