2016-10-11 09:31:17 +08:00
|
|
|
<% if !User.current.member_of?(@project) %>
|
|
|
|
<% if User.current.login? && !User.current.admin %>
|
|
|
|
<!--关注项目-->
|
|
|
|
<li class="mr5 fl">
|
|
|
|
<%= watcher_link_for_project(@project, User.current) %>
|
2016-10-28 17:47:21 +08:00
|
|
|
<%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id},:id=>"fans_num", :class => 'pro_new_topbtn fl' %>
|
2016-10-11 09:31:17 +08:00
|
|
|
</li>
|
|
|
|
<!--加入项目-->
|
|
|
|
<li class="mr5 fl">
|
|
|
|
<% if AppliedProject.where(:user_id => User.current, :project_id => @project_id).first.nil? %>
|
|
|
|
<%= join_in_project_link(@project, User.current) %>
|
|
|
|
<% else %>
|
|
|
|
<a style="cursor: default" class="pro_new_topbtn_left fl">等待审批</a>
|
|
|
|
<% end %>
|
2016-11-01 10:05:37 +08:00
|
|
|
<%= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员" %>
|
2016-10-11 09:31:17 +08:00
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<!--项目创建者不能退出项目-->
|
|
|
|
<% if User.current.id != @project.user_id %>
|
2016-11-08 10:23:02 +08:00
|
|
|
<%= "已加入" %>
|
2016-11-01 10:05:37 +08:00
|
|
|
<%= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员" %>
|
2016-07-29 19:42:21 +08:00
|
|
|
<% end %>
|
2016-09-23 10:36:47 +08:00
|
|
|
<% end %>
|
|
|
|
|
2016-11-08 10:23:02 +08:00
|
|
|
<!--项目fork-->
|
|
|
|
<% if @project.gpid && User.current.id != @project.user_id %>
|
|
|
|
<div class="fr mt5"><%= link_to "<span class='vl_fork'></span>".html_safe+"Fork", {:controller => 'repositories', :action => 'forked'}, :class=>"vl_btn", :target => "_blank", :confirm=>"平台将为您创建一个新的同名项目和版本库,请问是否继续?" %>
|
|
|
|
<span href="javascript:void(0);" class="vl_btn_2 fb"><%= link_to @project.forked_count.to_i, member_forked_project_path(@project) %></span>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
|
2016-10-11 09:31:17 +08:00
|
|
|
|