mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-31 11:21:06 -04:00
col-xs-N -> col-N, col-md-offset-N -> offset-md-N, row-fluid -> row, btn-block -> w-100, btn-xs -> btn-sm, form-group -> mb-3 (Bootstrap 5 dropped form-group), and btn-default (Bootstrap 3) -> btn-outline-secondary. The three helpers that combined btn-default with btn-secondary keep just btn-secondary. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
33 lines
940 B
Plaintext
33 lines
940 B
Plaintext
- content_for :title, "Listing roles"
|
|
|
|
- content_for :breadcrumbs do
|
|
%li.breadcrumb-item= link_to 'Admin', admin_path
|
|
%li.breadcrumb-item.active= link_to 'Roles', admin_roles_path
|
|
|
|
- if can? :create, Role
|
|
%p= link_to 'New role', new_admin_role_path, class: 'btn btn-primary'
|
|
|
|
%table.table.table-striped
|
|
%thead
|
|
%tr
|
|
%th Name
|
|
%th Description
|
|
%th
|
|
%th
|
|
|
|
- @roles.each do |role|
|
|
%tr
|
|
%td= role.name
|
|
%td= role.description
|
|
%td
|
|
- if can? :edit, role
|
|
= link_to edit_admin_role_path(role), class: 'btn btn-outline-secondary btn-sm' do
|
|
= edit_icon
|
|
= t('.edit')
|
|
- if can?(:destroy, role) && ! role.members.any?
|
|
= link_to admin_role_path(role), method: :delete, data: { confirm: t(:are_you_sure?) }, class: 'btn btn-outline-secondary btn-sm text-danger' do
|
|
= delete_icon
|
|
= t('.delete')
|
|
|
|
= will_paginate(@roles)
|