rework users page, add role assignment
This commit is contained in:
parent
9998e00ae3
commit
80d48ed7d8
13 changed files with 118 additions and 72 deletions
11
app/views/admin/users/_add_roles.html.haml
Normal file
11
app/views/admin/users/_add_roles.html.haml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
= semantic_form_for(user, url: add_role_admin_user_path(user), remote: true) do |f|
|
||||
.pull-left
|
||||
= f.action :submit, as: :button, label: 'Add Role', button_html: {value: 'Save', class: 'btn btn-success'}
|
||||
%br
|
||||
%br
|
||||
= f.fields_for :roles, Role.new do |role|
|
||||
= role.input :name, label: 'Select role', collection: Role::LABELS
|
||||
= role.label 'Select Conference'
|
||||
%br
|
||||
= role.input :resource, label: false, collection: Conference.all.map { |c| [c.short_title, c.id] }
|
||||
%br
|
||||
Loading…
Add table
Add a link
Reference in a new issue