1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/app/views/settings/roles/index.html.erb

47 lines
1.4 KiB
Text

<div class="container">
<div class="row">
<div class="col-md-3 mb-4">
<%= render partial: 'settings/nav_sidebar', locals: { tab: :roles } %>
</div>
<div class="col-md-9">
<table class="table">
<thead>
<tr>
<th scope="col">
<%= Role.human_attribute_name :id %>
</th>
<th scope="col">
<%= Role.human_attribute_name :name %>
</th>
<th scope="col">
<%= Role.human_attribute_name :resource %>
</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
<% @roles.each do |role| %>
<tr>
<td scope="row"><%= role.id %></td>
<td><%= role.human_name %></td>
<td><%= role.human_resource %></td>
<td>
<% if policy([:settings, role]).destroy? %>
<%= link_to [:settings, role],
method: :delete,
role: :button,
class: 'btn btn-danger btn-sm' do %>
<i class="fas fa-trash"></i>
<%= translate '.revoke' %>
<% end %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
</div>