退出项目/项目三种模式切换权限控制

This commit is contained in:
huang 2015-04-27 11:42:01 +08:00
parent 3c96c2275e
commit db8b79f3b4
1 changed files with 4 additions and 0 deletions

View File

@ -10,6 +10,10 @@
<!--退出项目-->
<% if User.current.admin? || User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, @project) %>
<%= link_to "<span class='pr_setting'></span>#{l(:button_configure)}".html_safe, settings_project_path(@project), :class => "pr_join_a" %>
<% end %>
<% if Member.where(:user_id => User.current.id, :project_id=>@project.id).first.roles.first.to_s.include?("Manager") || User.current.admin? %>
<%= link_to "<span class='#{typeclass}'></span>#{text}".html_safe,"javascript:void(0)" ,:onClick => "show_window();", :class => "pr_join_a",:id => "setting_project_type"%>
<% else %>
<%= exit_project_link(@project) %>
<% end %>
</div>