Fixed admin/users modal display
This commit is contained in:
parent
7c7cbc0310
commit
86b007d60e
1 changed files with 21 additions and 19 deletions
|
|
@ -45,25 +45,27 @@
|
||||||
%td
|
%td
|
||||||
= user.roles.map { |role| role.name }.join ','
|
= user.roles.map { |role| role.name }.join ','
|
||||||
%td
|
%td
|
||||||
.modal.hide.fade{:id => "user-role-selection-#{user.id}", "role" => "dialog", "aria-hidden" => "true"}
|
.modal.fade{:id => "user-role-selection-#{user.id}", "role" => "dialog", "aria-hidden" => "true"}
|
||||||
.modal-header
|
.modal-dialog
|
||||||
%button{"type"=>"button", :class=>"close", "data-dismiss"=>"modal", "aria-hidden"=>"true"}
|
.modal-content
|
||||||
×
|
.modal-header
|
||||||
%h3{:id => "role-selector-header-#{user.id}"}
|
%button{"type"=>"button", :class=>"close", "data-dismiss"=>"modal", "aria-hidden"=>"true"}
|
||||||
Modifying Roles
|
×
|
||||||
.modal-body
|
%h3{:id => "role-selector-header-#{user.id}"}
|
||||||
- if current_user == user
|
Modifying Roles
|
||||||
You cannot modify your own role!
|
.modal-body
|
||||||
%br
|
- if current_user == user
|
||||||
%button{:class=> "btn btn-danger", "data-dismiss"=> "modal", "aria-hidden"=>"true"}
|
You cannot modify your own role!
|
||||||
Cancel
|
%br
|
||||||
- else
|
%button{:class=> "btn btn-danger", "data-dismiss"=> "modal", "aria-hidden"=>"true"}
|
||||||
= "Give #{user.public_name} (#{user.email}) the following roles:"
|
Cancel
|
||||||
= semantic_form_for(user, :url => admin_user_path(user), :method => :put) do |f|
|
- else
|
||||||
= f.input :roles, :label => false
|
= "Give #{user.public_name} (#{user.email}) the following roles:"
|
||||||
%button{:class=> "btn btn-danger", "data-dismiss"=> "modal", "aria-hidden"=>"true"}
|
= semantic_form_for(user, :url => admin_user_path(user), :method => :put) do |f|
|
||||||
Cancel
|
= f.input :roles, :label => false
|
||||||
= f.action :submit, :as => :button, :button_html => {:value => "Save", :class => "btn btn-primary"}
|
%button{:class=> "btn btn-danger", "data-dismiss"=> "modal", "aria-hidden"=>"true"}
|
||||||
|
Cancel
|
||||||
|
= f.action :submit, :as => :button, :button_html => {:value => "Save", :class => "btn btn-primary"}
|
||||||
=link_to "Modify Roles", "#", "data-toggle" => "modal", "data-target" => "#user-role-selection-#{user.id}"
|
=link_to "Modify Roles", "#", "data-toggle" => "modal", "data-target" => "#user-role-selection-#{user.id}"
|
||||||
%td
|
%td
|
||||||
=link_to "Details", "javascript: void(0)", :class => "user-details-popover", "data-trigger" => "click", "data-placement" => "bottom",
|
=link_to "Details", "javascript: void(0)", :class => "user-details-popover", "data-trigger" => "click", "data-placement" => "bottom",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue