socialforge/app/views/layouts/_join_exit_project.html.erb

25 lines
1.4 KiB
Plaintext
Raw Normal View History

<div class="pr_info_join fl">
<!--关注:非项目成员-->
<% if !User.current.member_of?(@project) && User.current.login? && !User.current.admin %>
<span><%= watcher_link_for_project(@project, User.current) %></span>
<% end %>
<!--加入项目 -->
<% if !User.current.member_of?(@project) && User.current.login? && !User.current.admin %>
<%= join_in_project_link(@project, User.current) %>
<% end %>
2015-04-27 15:39:36 +08:00
<!--配置项目-->
2015-04-21 16:35:51 +08:00
<% 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 %>
2015-04-27 15:39:36 +08:00
<!--项目类型-->
<% if (User.current.login? && User.current.member_of?(@project) && Member.where(:user_id => User.current.id, :project_id => @project.id).first.roles.to_s.include?("Manager")) || User.current.admin? %>
2015-04-22 13:34:57 +08:00
<%= link_to "<span class='#{typeclass}'></span>#{text}".html_safe,"javascript:void(0)" ,:onClick => "show_window();", :class => "pr_join_a",:id => "setting_project_type"%>
2015-04-27 15:39:36 +08:00
<% end %>
<!--退出项目-->
<% if (User.current.member_of? @project) && User.current.login? && !User.current.admin &&
!Member.where(:user_id => User.current.id, :project_id => @project.id).first.roles.to_s.include?("Manager") %>
<%= exit_project_link(@project) %>
<% end %>
</div>