|
2 | 2 | <td><%= role.identifier %></td> |
3 | 3 | <td><%= role.name %></td> |
4 | 4 | <td><%= role.description %></td> |
5 | | - <td><%= role.resource_type.constantize.model_name.human %></td> |
| 5 | + <td><%= role.resource_type %></td> |
6 | 6 | <td><%= role.position %></td> |
7 | 7 | <td><%= role.protected ? t('globals.yes') : t('globals.no') %></td> |
8 | 8 | <td class="text-end"> |
9 | 9 | <%= link_to role_path(role), class: 'btn btn-outline-info btn-sm me-1', 'aria-label' => t('globals.show') do %> |
10 | 10 | <i class="fas fa-eye"></i> <%= t('globals.show') %> |
11 | 11 | <% end %> |
12 | | - |
| 12 | + |
13 | 13 | <% if policy(role).edit? %> |
14 | 14 | <%= link_to edit_role_path(role), class: 'btn btn-outline-secondary btn-sm me-1', 'aria-label' => t('globals.edit') do %> |
15 | 15 | <i class="fas fa-edit"></i> <%= t('globals.edit') %> |
16 | 16 | <% end %> |
17 | 17 | <% end %> |
18 | 18 |
|
19 | 19 | <% if policy(role).destroy? %> |
20 | | - <%= link_to role_path(role), |
21 | | - method: :delete, |
22 | | - data: { turbo_method: :delete, turbo_confirm: t('roles.confirm_destroy') }, |
23 | | - class: 'btn btn-outline-danger btn-sm', |
| 20 | + <%= link_to role_path(role), |
| 21 | + method: :delete, |
| 22 | + data: { turbo_method: :delete, turbo_confirm: t('roles.confirm_destroy') }, |
| 23 | + class: 'btn btn-outline-danger btn-sm', |
24 | 24 | 'aria-label' => t('globals.destroy') do %> |
25 | 25 | <i class="fas fa-trash-alt"></i> <%= t('globals.destroy') %> |
26 | 26 | <% end %> |
|
0 commit comments