Sha256: 9ed52105db02e7cbcca2c68ee4f34d189599c4145d04b8cf7ac03a619853a645

Contents?: true

Size: 1.64 KB

Versions: 10

Compression:

Stored size: 1.64 KB

Contents

<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>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
cbac-0.6.8 lib/generators/cbac/copy_files/views/generic_roles/index.html.erb
cbac-0.6.7 lib/generators/cbac/copy_files/views/generic_roles/index.html.erb
cbac-0.6.5 lib/generators/cbac/copy_files/views/generic_roles/index.html.erb
cbac-0.6.4 lib/generators/cbac/copy_files/views/generic_roles/index.html.erb
cbac-0.6.2 lib/generators/cbac/copy_files/views/generic_roles/index.html.erb
cbac-0.5.4 generators/cbac/templates/views/generic_roles/index.html.erb
cbac-0.5.3 generators/cbac/templates/views/generic_roles/index.html.erb
cbac-0.5.2 generators/cbac/templates/views/generic_roles/index.html.erb
cbac-0.5.1 generators/cbac/templates/views/generic_roles/index.html.erb
cbac-0.3.1 generators/cbac/templates/views/generic_roles/index.html.erb