2012-01-13 10:20:04 +00:00
|
|
|
<% content_for :secondary do %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<!-- Remove if CSS done-->
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
<!-- Remove if CSS done-->
|
2012-01-19 09:47:52 +00:00
|
|
|
<h3><%= @module_app.title %></h3>
|
2012-01-13 10:20:04 +00:00
|
|
|
|
|
|
|
<div id="manager_management">
|
2012-01-19 09:47:52 +00:00
|
|
|
<h1>Manager</h1>
|
|
|
|
|
2012-01-13 10:20:04 +00:00
|
|
|
<dl id="manager">
|
|
|
|
<dt>Manager</ht>
|
|
|
|
<% @module_app.managers.each do |manager| %>
|
2012-01-17 08:20:03 +00:00
|
|
|
<dd><%= 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 %> </dd>
|
2012-01-13 10:20:04 +00:00
|
|
|
<% end %>
|
|
|
|
<dd>Add:
|
|
|
|
<%= form_tag(assign_manager_admin_module_app_path) do %>
|
2012-01-19 09:47:52 +00:00
|
|
|
<%= collection_select(:manager,:id, User.all, :id, :name, :prompt => true,:disabled => !if_permit_to_assign(:manager))%>
|
2012-01-13 10:20:04 +00:00
|
|
|
<%= submit_tag 'Add Manager' %>
|
|
|
|
<% end %>
|
|
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
<dl id="sub_manager">
|
|
|
|
<dt>Sub Manager</ht>
|
|
|
|
<% @module_app.sub_managers.each do |manager| %>
|
2012-01-17 08:20:03 +00:00
|
|
|
<dd><%= 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 %> </dd>
|
2012-01-13 10:20:04 +00:00
|
|
|
<% end %>
|
|
|
|
<dd>Add:
|
|
|
|
<%= form_tag(assign_sub_manager_admin_module_app_path) do %>
|
2012-01-19 09:47:52 +00:00
|
|
|
<%= collection_select(:sub_manager,:id, User.all, :id, :name, :prompt => true,:disabled => !if_permit_to_assign(:sub_manager))%>
|
2012-01-13 10:20:04 +00:00
|
|
|
<%= submit_tag 'Add Sub Manager' %>
|
|
|
|
<% end %>
|
|
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
</div>
|
2012-02-07 08:16:48 +00:00
|
|
|
<%= render :partial => "admin/components/user_role_management", :locals => { :object => @module_app ,:auth=> @module_app.app_auth } %>
|
|
|
|
|