44 lines
2.5 KiB
Plaintext
44 lines
2.5 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-->
|
|
<li class="mr5 fl">
|
|
<%= 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>
|
|
|
|
|