mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-24 08:52:14 -04:00
Haml clean up for Roles views
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
= form_for @role do |f|
|
||||
- if @role.errors.any?
|
||||
#error_explanation
|
||||
%h2= "#{pluralize(@role.errors.size, "error")} prohibited this role from being saved:"
|
||||
%h2
|
||||
= pluralize(@role.errors.size, "error")
|
||||
prohibited this role from being saved:
|
||||
%ul
|
||||
- @role.errors.full_messages.each do |msg|
|
||||
%li= msg
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
- content_for :title, "Listing roles"
|
||||
|
||||
- if can? :create, Role
|
||||
%p= link_to 'New Role', new_role_path, :class => 'btn btn-primary'
|
||||
%p= link_to 'New Role', new_role_path, class: 'btn btn-primary'
|
||||
|
||||
%table
|
||||
%tr
|
||||
@@ -16,6 +16,7 @@
|
||||
%td= link_to role.name, role
|
||||
%td= role.description
|
||||
- if can? :edit, role
|
||||
%td= link_to 'Edit', edit_role_path(role), :class => 'btn btn-default btn-xs'
|
||||
%td= link_to 'Edit', edit_role_path(role), class: 'btn btn-default btn-xs'
|
||||
- if can? :destroy, role
|
||||
%td= link_to 'Delete', role, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-default btn-xs'
|
||||
%td= link_to 'Delete', role, method: :delete,
|
||||
data: { confirm: 'Are you sure?' }, class: 'btn btn-default btn-xs'
|
||||
|
||||
@@ -7,6 +7,6 @@
|
||||
%b Description:
|
||||
= @role.description
|
||||
|
||||
= link_to 'Edit', edit_role_path(@role), :class => 'btn btn-default btn-xs'
|
||||
= link_to 'Edit', edit_role_path(@role), class: 'btn btn-default btn-xs'
|
||||
\|
|
||||
= link_to 'Back', roles_path
|
||||
|
||||
Reference in New Issue
Block a user