Roles into their own controller. Rework interface. Add flash messages to ajax calls. Add description to roles. Possible to edit roles in use.

This commit is contained in:
Stella 2015-01-12 23:13:10 +02:00 committed by Stella Rouzi
parent eda5c2bc07
commit ccd7ecbb90
59 changed files with 618 additions and 356 deletions

View file

@ -0,0 +1,20 @@
.page-header
%h3 Users (#{users.length})
- if users.present?
%table.table.table-striped.table-bordered.table-hover.datatable#users
%thead
%th.col-md-1
%th ID
%th Name
%th Email
%tbody
- users.each do |user|
%tr
%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: "/admin/conference/#{@conference.short_title}/roles/#{@role.name}/toggle_user?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!