59 lines
3.6 KiB
Plaintext
59 lines
3.6 KiB
Plaintext
<% if !User.current.member_of?(@project) %>
|
|
<% if User.current.login? && !User.current.admin %>
|
|
<!--关注项目-->
|
|
<li class="mr5 fl">
|
|
<%= watcher_link_for_project(@project, User.current) %>
|
|
<%= link_to "#{@project.watcher_users.count}", {:controller => "projects", :action => "project_watcherlist",
|
|
:id => @project.id}, :id => "fans_num", :class => 'pro_new_topbtn fl', :title => "关注成员列表" %>
|
|
</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 %>
|
|
<%= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员列表" %>
|
|
</li>
|
|
<% end %>
|
|
<% else %>
|
|
<!--项目创建者不能退出项目-->
|
|
<% if User.current.login? %>
|
|
<li class="mr5 fl">
|
|
<%= watcher_link_for_project(@project, User.current) %>
|
|
<%= link_to "#{@project.watcher_users.count}", {:controller => "projects", :action => "project_watcherlist",
|
|
:id => @project.id}, :id => "fans_num", :class => 'pro_new_topbtn fl', :title => "关注成员列表" %>
|
|
</li>
|
|
<li class="mr5 fl">
|
|
<a class="pro_new_topbtn_left fl " style="cursor:default;"> 已加入</a>
|
|
<!-- <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 => "项目成员列表" %>
|
|
</li>
|
|
<%#= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员" %>
|
|
<% end %>
|
|
<% end %>
|
|
<!--项目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>-->
|
|
<li class="mr5 fl">
|
|
<!-- <a href="<%#= {:controller => 'repositories', :action => 'forked'} %>" class="pro_new_topbtn_left fl" target="_blank">Fork</a>-->
|
|
<%= link_to "<span class='vl_fork'></span>".html_safe+"Fork", forked_pop_project_path(@project),
|
|
:class=>"pro_new_topbtn_left fl", :remote => true %>
|
|
<a href="<%= member_forked_project_path(@project) %>" class=" pro_new_topbtn fl" title="fork成员列表"><%= project_fork_count %></a>
|
|
|
|
</li>
|
|
<% 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_fork_count %></a>
|
|
<% end %>
|
|
|
|
|