<%= form(:action => form_url, :method => method, :id => form_id, :class => 'form roleForm') do -%> <% unless form_for == 'edit' %>
<%= text_field :id => "role_name", :name => "name", :class => "text_field", :value => params.has_key?(:name) ? h(params[:name]) : @role.name %> The name of the Role
<% end %>
<%= text_area(params.has_key?(:description) ? h(params[:description]) : @role.description, :name => "description", :class => "text_area", :id => "role_description") %> A description of this Role
Available Roles
    <% @available_roles.each do |role| %>
  • <%= h(role) -%>
  • <% end %>
Available Recipes
<%= image_tag('indicator.gif') -%>
<% if @current_env == '_default' -%> Default Run List <% else -%> Run List for <%= @current_env -%> <% end -%> <%= select :environment, :collection => [['noop','Other Environments']].concat(@environments.map {|e| [e,e]}), :id => 'activeEnvironment'%>
<% @run_lists.each do |environment, run_list| %> <%= partial('run_lists', :environment => environment, :run_list => run_list)%> <% end %>
Active Run List for <%= h(@current_env) -%>
<% if @current_env != "_default" && @role.env_run_lists[@current_env].nil? %>
using <%= @role.active_run_list_for(@current_env).gsub('_default', 'default') -%> run list
<% end %>
    <% @role.run_list_for(@current_env).each do |item| %>
  • <%= h(item) -%>
  • <% end %>
<%= partial 'layout/jsonedit', :json => { :defaults => @role.default_attributes, :overrides => @role.override_attributes }.to_json%> A JSON hash for default attributes for nodes of this role. These attributes will be applied according to the attribute precedence rules.
<%= submit(submit_name, :id => submit_id, :class => 'button') -%>
<% end =%>