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-11-24 17:40:33 +08:00
|
|
|
<%= link_to "#{@project.watcher_users.count}", {:controller => "projects", :action => "watcherlist",
|
|
|
|
:id => @project.id}, :id => "fans_num", :class => 'pro_new_topbtn fl', :title => "关注成员列表" %>
|
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-24 17:40:33 +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 %>
|
|
|
|
<!--项目创建者不能退出项目-->
|
2016-11-24 17:40:33 +08:00
|
|
|
<% if User.current.login? %>
|
|
|
|
<li class="mr5 fl">
|
|
|
|
<%= watcher_link_for_project(@project, User.current) %>
|
|
|
|
<%= link_to "#{@project.watcher_users.count}", {:controller => "projects", :action => "watcherlist",
|
|
|
|
:id => @project.id}, :id => "fans_num", :class => 'pro_new_topbtn fl', :title => "关注成员列表" %>
|
|
|
|
</li>
|
2016-11-08 16:18:59 +08:00
|
|
|
<li class="mr5 fl">
|
2016-11-11 16:09:43 +08:00
|
|
|
<a class="pro_new_topbtn_left fl "> 已加入</a>
|
2016-11-24 17:40:33 +08:00
|
|
|
<!-- <a href="<%= project_member_path(@project) %>" class=" pro_new_topbtn fl"><%= Member.where(:project_id => @project.id).count %></a>-->
|
|
|
|
<%= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员列表" %>
|
2016-11-08 16:18:59 +08:00
|
|
|
</li>
|
|
|
|
<%#= 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 %>
|
2016-11-08 16:18:59 +08:00
|
|
|
<!-- <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>-->
|
|
|
|
<li class="mr5 fl">
|
|
|
|
<!-- <a href="<%#= {:controller => 'repositories', :action => 'forked'} %>" class="pro_new_topbtn_left fl" target="_blank">Fork</a>-->
|
2016-11-11 10:37:20 +08:00
|
|
|
<%= link_to "<span class='vl_fork'></span>".html_safe+"Fork", forked_pop_project_path(@project),
|
2016-11-08 16:18:59 +08:00
|
|
|
:class=>"pro_new_topbtn_left fl", :remote => true %>
|
2016-11-24 17:40:33 +08:00
|
|
|
<a href="<%= member_forked_project_path(@project) %>" class=" pro_new_topbtn fl" title="fork成员列表"><%= @project.forked_count.to_i %></a>
|
|
|
|
|
2016-11-08 16:18:59 +08:00
|
|
|
</li>
|
2016-11-24 17:40:33 +08:00
|
|
|
<% else%>
|
|
|
|
<li class="mr5 fl">
|
|
|
|
<%#= link_to "<span class='vl_fork '></span>".html_safe+"Fork","#",
|
|
|
|
:class=>"pro_new_grey_topbtn_left fl"%>
|
|
|
|
<a href="javascript:void(0)" class="pro_new_grey_topbtn_left fl" >
|
|
|
|
<span class='vl_fork'>Fork</span>
|
|
|
|
</a>
|
|
|
|
<a href="<%= member_forked_project_path(@project) %>" class=" pro_new_topbtn fl" title="fork成员列表"><%= @project.forked_count.to_i %></a>
|
2016-11-08 10:23:02 +08:00
|
|
|
<% end %>
|
|
|
|
|
2016-10-11 09:31:17 +08:00
|
|
|
|