lib/generators/cbac/copy_files/views/generic_roles/index.html.erb in cbac-0.6.3 vs lib/generators/cbac/copy_files/views/generic_roles/index.html.erb in cbac-0.6.4

- old
+ new

@@ -1,59 +1,59 @@ -<div class="cbac"> - <h1>Generic roles</h1> - <table> - <tr> - <th class="medium">Name</th> - <th class="large">Remarks</th> - <th class="small">&nbsp;</th> - </tr> - - <% Cbac::GenericRole.find(:all).each do |role| %> - <tr class="row"> - <% form_for role do |r| %> - <td class="medium"><%= r.text_field :name %></td> - <td class="large"><%= r.text_field :remarks, :rows => 1 %></td> - <td class="small"><%= r.submit "OK" %></td> - <% end %> - </tr> - <% end%> - </table> - - <div class="linebreak"></div> - - <table> - <% form_for(Cbac::GenericRole.new) do |new_role| %> - <tr class="row"> - <th colspan="2">New generic role</th> - </tr> - <tr class="row"> - <td class="medium">Name</td> - <td class="medium"><%= new_role.text_field :name %></td> - </tr> - <tr class="row"> - <td class="medium">Remarks</td> - <td class="large"><%= new_role.text_field :remarks %></td> - </tr> - <tr class="row"> - <td colspan="2" class="submit"><%= new_role.submit "Create" %></td> - </tr> - <% end %> - </table> - - <div class="linebreak"></div> - - <table> - <% form_tag(:controller => "cbac/generic_roles", :action => "delete") do |f| %> - <tr> - <th colspan="2">Delete generic role</th> - </tr> - <tr> - <td class="medium">Select role</td> - <td class="medium"><%= select_tag "id", Cbac::GenericRole.find(:all).collect{|role|"<option value='#{role.id}'>#{role.name}</option>"} %> - </td> - </tr> - <tr> - <td colspan="2" class="submit"><%= submit_tag "Delete" %></td> - </tr> - <% end %> - </table> +<div class="cbac"> + <h1>Generic roles</h1> + <table> + <tr> + <th class="medium">Name</th> + <th class="large">Remarks</th> + <th class="small">&nbsp;</th> + </tr> + + <% Cbac::GenericRole.find(:all).each do |role| %> + <tr class="row"> + <% form_for role do |r| %> + <td class="medium"><%= r.text_field :name %></td> + <td class="large"><%= r.text_field :remarks, :rows => 1 %></td> + <td class="small"><%= r.submit "OK" %></td> + <% end %> + </tr> + <% end%> + </table> + + <div class="linebreak"></div> + + <table> + <% form_for(Cbac::GenericRole.new) do |new_role| %> + <tr class="row"> + <th colspan="2">New generic role</th> + </tr> + <tr class="row"> + <td class="medium">Name</td> + <td class="medium"><%= new_role.text_field :name %></td> + </tr> + <tr class="row"> + <td class="medium">Remarks</td> + <td class="large"><%= new_role.text_field :remarks %></td> + </tr> + <tr class="row"> + <td colspan="2" class="submit"><%= new_role.submit "Create" %></td> + </tr> + <% end %> + </table> + + <div class="linebreak"></div> + + <table> + <% form_tag(:controller => "cbac/generic_roles", :action => "delete") do |f| %> + <tr> + <th colspan="2">Delete generic role</th> + </tr> + <tr> + <td class="medium">Select role</td> + <td class="medium"><%= select_tag "id", Cbac::GenericRole.find(:all).collect{|role|"<option value='#{role.id}'>#{role.name}</option>"} %> + </td> + </tr> + <tr> + <td colspan="2" class="submit"><%= submit_tag "Delete" %></td> + </tr> + <% end %> + </table> </div> \ No newline at end of file