|
| 1 | +.block#block-tables |
| 2 | + .content |
| 3 | + %h2.title Create New Role |
| 4 | + .inner |
| 5 | + = form :action => slice_url(:roles), :method => :post, :id => 'create_role', :class => 'form' do |
| 6 | + %div.group |
| 7 | + %label.label Name |
| 8 | + = text_field :name => "name", :class => "text_field" |
| 9 | + %span.description The name of the Role |
| 10 | + %div.group |
| 11 | + %label.label Description |
| 12 | + = text_area :name => "description", :class => "text_area" |
| 13 | + %span.description A description of this Role |
| 14 | + %div.group |
| 15 | + %label.label Default Attributes |
| 16 | + = text_area :name => "default_attributes", :class => "text_area", :rows => 10, :cols => 80 |
| 17 | + %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. |
| 18 | + %div.group |
| 19 | + %label.label Override Attributes |
| 20 | + = text_area :name => "override_attributes", :class => "text_area", :rows => 10, :cols => 80 |
| 21 | + %span.description A JSON hash for the override attributes for nodes which have this role. These attributes will always apply to every node with this role, regardless of any other value. |
| 22 | + %div.group |
| 23 | + %table.sortable |
| 24 | + %tr |
| 25 | + %td |
| 26 | + %label.label Available Recipes |
| 27 | + %td |
| 28 | + %label.label Recipes for this Role |
| 29 | + %tr |
| 30 | + %td |
| 31 | + %div.sortable |
| 32 | + %ul#available_recipes.connectedSortable |
| 33 | + - @available_recipes.each do |cookbook| |
| 34 | + %li{ :id => h(cookbook.name), :class => 'ui-state-highlight' }= h cookbook.name |
| 35 | + %td |
| 36 | + %div.sortable |
| 37 | + %ul#for_role.connectedSortable |
| 38 | + |
| 39 | + %td.help |
| 40 | + %span.description |
| 41 | + Drag recipes from the list of Available Recipes section on the left, and drop them |
| 42 | + in the "Recipes for this Role" section on the right. Then sort the recipes for this role list to the order you would like to see the recipes applied. |
| 43 | + %div.group |
| 44 | + .actions-bar |
| 45 | + .actions= submit "Create Role", :id => 'create_role_button', :class => 'button' |
0 commit comments