socialforge/app/views/projects/_applied_status.html.erb

28 lines
1.3 KiB
Plaintext
Raw Normal View History

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) %>
<%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id}, :class => 'pro_new_topbtn fl' %>
</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 "#{@project.members.count}", project_member_path(@project), :class => 'pro_new_topbtn fl' %>
</li>
<% end %>
<% else %>
<li class="mr5 fl"><%= store_project_link(@project.id, User.current.id) %><a href="javascript:void(0);" class="pro_new_topbtn fl"> 10</a></li>
<!--项目创建者不能退出项目-->
<% if User.current.id != @project.user_id %>
<%= exit_project_link(@project) %>
<%= link_to "#{@project.members.count}", project_member_path(@project), :class => 'pro_new_topbtn fl' %>
2016-07-29 19:42:21 +08:00
<% end %>
2016-09-23 10:36:47 +08:00
<% end %>
2016-10-11 09:31:17 +08:00