<% 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 %>

User Role

<%= form_tag(admin_module_app_app_auths_path(@module_app),:method => :post) do %> <%= collection_select(:new,:role, Role.all, :id, :key, :prompt => true) %> <%= submit_tag 'Add Role' %>
<%= collection_select(:new,:sub_role, SubRole.all, :id, :key, :prompt => true) %> <%= submit_tag 'Add SubRole' %>
<%= collection_select(:new,:privilege_user, User.all, :id, :name, :prompt => true) %> <%= submit_tag 'Add PrivilegeList' %>
<%= collection_select(:new,:blocked_user, User.all, :id, :name, :prompt => true) %> <%= submit_tag 'Add BlockedList' %>
<% end %> <% unless @module_app.app_auth.nil? %> <% @module_app.app_auth.roles.each do |role| %>
  • <%= role.key %> Build in:<%= role.built_in ? 'Yes' : 'No' %> <%= link_to '[X]',remove_admin_module_app_app_auth_path(@module_app,@module_app.app_auth,'role',role),:method => :delete %>
  • <% end %> <% @module_app.app_auth.sub_roles.each do |role| %>
  • <%= role.key %> Build in:<%= role.built_in ? 'Yes' : 'No' %>
  • <%= link_to '[X]',remove_admin_module_app_app_auth_path(@module_app,@module_app.app_auth,'sub_role',role),:method => :delete %> <% end %> <% @module_app.app_auth.privilege_users.each do |user| %>
  • <%= user.name %> <%= link_to '[X]',remove_admin_module_app_app_auth_path(@module_app,@module_app.app_auth,'privilege_user',user),:method => :delete %>
  • <% end %> <% @module_app.app_auth.blocked_users.each do |user| %>
  • <%= user.name %><%= link_to '[X]',remove_admin_module_app_app_auth_path(@module_app,@module_app.app_auth,'blocked_user',user),:method => :delete %>
  • <% end %> <% end %>