Sha256: 4fb4cf583efd4260cdc005782ab78108bb97e122e10e6f956e48d59ee62ed8d7

Contents?: true

Size: 1.01 KB

Versions: 29

Compression:

Stored size: 1.01 KB

Contents

<% @page_name = 'Roles' %>

<%= content_for :data_controls do %>
  <%= link_to 'New Role', new_admin_role_path, :class => 'btn btn-primary' %>
<% end %>

<% content_for :detail do %>
  <div class="table-responsive">
    <table class="table table-striped table-hover">
      <thead>
        <tr>
          <th>Name</th>
          <th># Users</th>
          <th>Permissions</th>
          <th></th>
        </tr>
      </thead>
      <tbody>
        <% @roles.each do |role| %>
          <tr>
            <td><%= role.name %></td>
            <td><%= role.users.count %></td>
            <td><%= role.permissions.collect(&:name).join(', ') %></td>
            <td align="right">
              <%= link_to 'Edit', edit_admin_role_path(role), :class => 'btn btn-sm btn-default' %>
              <%= link_to 'Delete', admin_role_path(role), :method => :delete, :data => {:confirm => 'Are you sure?'}, :class => 'btn btn-sm btn-danger' %>
            </td>
          </tr>
        <% end %>
      </tbody>
    </table>
  </div>
<% end %>

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
tb_core-1.5.4 app/views/admin/roles/index.html.erb
tb_core-1.5.3 app/views/admin/roles/index.html.erb
tb_core-1.5.2 app/views/admin/roles/index.html.erb
tb_core-1.5.1 app/views/admin/roles/index.html.erb
tb_core-1.4.3.1 app/views/admin/roles/index.html.erb
tb_core-1.5.0 app/views/admin/roles/index.html.erb
tb_core-1.4.8 app/views/admin/roles/index.html.erb
tb_core-1.4.7 app/views/admin/roles/index.html.erb
tb_core-1.4.6 app/views/admin/roles/index.html.erb
tb_core-1.4.5 app/views/admin/roles/index.html.erb
tb_core-1.4.4 app/views/admin/roles/index.html.erb
tb_core-1.4.3 app/views/admin/roles/index.html.erb
tb_core-1.4.2 app/views/admin/roles/index.html.erb
tb_core-1.4.1 app/views/admin/roles/index.html.erb
tb_core-1.4.0.1 app/views/admin/roles/index.html.erb
tb_core-1.4.beta2 app/views/admin/roles/index.html.erb
tb_core-1.4.beta1 app/views/admin/roles/index.html.erb
tb_core-1.3.10 app/views/admin/roles/index.html.erb
tb_core-1.3.9 app/views/admin/roles/index.html.erb
tb_core-1.3.7 app/views/admin/roles/index.html.erb