osem-fcy/app/views/admin/roles/_users.html.haml
James Mason 05c103b189
Consistent, concise styling of datables
Add a semantic class to aggregate bootstrap classes and consistently
applyt them to all datatables.
2018-06-20 09:32:22 -07:00

22 lines
761 B
Text

.page-header
%h3 Users (#{users.length})
- if users.present?
%table.datatable#users
%thead
- if ( can? :toggle_user, @role )
%th.col-md-1
%th ID
%th Name
%th Email
%tbody
- users.each do |user|
%tr
- if ( can? :toggle_user, @role )
%td.text-right
= hidden_field_tag "role[user_ids][]", nil
= check_box_tag @conference.short_title, @role.id, (@role.user_ids.include? user.id), method: :post, url: "#{@url}?user[email]=#{user.email}&user[state]=", class: 'switch-checkbox', data: { size: 'small', off_color: 'warning', on_text: 'Yes', off_text: 'No' }
%td= user.id
%td= user.name
%td= user.email
- else
%h5 No users found!