<% content_for :secondary do %> <% end %>


<%= @module_app.title %>

Manager

Manager <% @module_app.managers.each do |manager| %>
<%= manager.user.name %> <%= get_auth_by(manager) %> <%= link_to '[X]',remove_manager_admin_module_app_path(@module_app,manager),:method => :delete if if_permit_to_delete(:manager) && manager.user != current_user %>
<% end %>
Add: <%= form_tag(assign_manager_admin_module_app_path) do %> <%= collection_select(:manager,:id, User.all, :id, :name, :prompt => true,:disabled => !if_permit_to_assign(:manager))%> <%= submit_tag 'Add Manager' %> <% end %>
Sub Manager <% @module_app.sub_managers.each do |manager| %>
<%= manager.user.name %> -AuthBy:<%= manager.rule_creator.name %> <%= link_to '[X]',remove_sub_manager_admin_module_app_path(@module_app,manager),:method => :delete if if_permit_to_delete(:sub_manager) && manager.user != current_user %>
<% end %>
Add: <%= form_tag(assign_sub_manager_admin_module_app_path) do %> <%= collection_select(:sub_manager,:id, User.all, :id, :name, :prompt => true,:disabled => !if_permit_to_assign(:sub_manager))%> <%= submit_tag 'Add Sub Manager' %> <% end %>
<%= render :partial => "admin/components/user_role_management", :locals => { :object => @module_app ,:auth=> @module_app.app_auth ,:submit_url=> admin_module_app_app_auths_path(@module_app),:ploy_route_ary=>['remove',:admin,@module_app,@module_app.app_auth] } %>