mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
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:
parent
eda5c2bc07
commit
ccd7ecbb90
59 changed files with 618 additions and 356 deletions
20
app/views/admin/roles/_users.html.haml
Normal file
20
app/views/admin/roles/_users.html.haml
Normal 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!
|
||||
Loading…
Add table
Add a link
Reference in a new issue