Files
growstuff/app/views/admin/roles/index.html.haml
T
Brenda WallaceandClaude Sonnet 5 742599fea6 Rename Bootstrap 3/4 grid, button and form-group classes
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>
2026-09-20 18:01:45 +12:00

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)