Search by email address to delegate a school to a user
<% if @user %>| User Email | School to delegate | |
|---|---|---|
| <%= @user.email %> | <%= form_for SchoolDelegate.new, :url => url_for(:controller => 'tournaments', :action => 'school_delegate', :method => "post") do |f| %><%= f.collection_select :school_id, @tournament.schools, :id, :name %> | <%= f.hidden_field :user_id, :value => @user.id %> <% if can? :manage, @tournament %> <%= submit_tag "Give permissions", :class=>"btn btn-success"%> <% end %> <% end %> |
| User Email | School | |
|---|---|---|
| <%= delegate.user.email %> | <%= delegate.school.name %> | <%= link_to 'Remove permissions', "/tournaments/#{@tournament.id}/#{delegate.id}/remove_school_delegate", method: :delete, confirm: 'Are you sure?', :class=>"btn btn-danger btn-sm" %> |