.content .inner - if form_for != "edit" %div.group.form %label.label Name = text_field :id => "role_name", :name => "name", :class => "text_field", :value => params.has_key?(:name) ? h(params[:name]) : @role.name %span.description The name of the Role %div.group.form %label.label Description = text_area(params.has_key?(:description) ? h(params[:description]) : @role.description, :name => "description", :class => "text_area", :id => "role_description") %span.description A description of this Role %div.group.form %table.sortable %tr %td %label.label Available Roles %td %label.label Run List %tr %td %div.sortable %ul#node_available_roles.connectedSortable - @available_roles.each do |role| %li{ :id => "role[#{role}]", :class => 'ui-state-highlight' }= h role %td{:rowspan => 3} %div.sortable.run-list %ul#for_role.connectedSortable - @run_list.each do |entry| - type, name, fname = @run_list.parse_entry(entry) %li{ :id => h(fname), :class => type == 'role' ? 'ui-state-highlight' : 'ui-state-default' }= h name %td.help %span.description Drag recipes from the list of Available Recipes section on the left, and drop them in the "Recipes for this node" section on the right. Then sort the recipes for this node list to the order you would like to see the recipes applied. %tr %td %label.label Available Recipes %tr %td %div.sortable %ul#node_available_recipes.connectedSortable - @available_recipes.each do |recipe| %li{ :id => "recipe[#{recipe}]", :class => 'ui-state-default' }= h recipe %div.group.form{:style => "position:relative;"} %label.label Default and Override Attributes = partial 'layout/jsonedit', :json => { :defaults => @role.default_attributes, :overrides => @role.override_attributes }.to_json %span.description A JSON hash for default attributes for nodes of this role. These attributes will only be applied if the node does not already have a value for the attributes. = form(:action => form_url, :method => :post, :id => form_id, :class => 'form') do %div.group .actions-bar .actions= submit submit_name, :id => submit_id, :class => 'button'