2016-08-25 11:30:47 +08:00
|
|
|
<% member = Member.where("user_id = #{@user.id} and project_id = #{project.id}").first %>
|
|
|
|
<% if User.current == @user %>
|
|
|
|
<% if member %>
|
2016-08-25 15:55:36 +08:00
|
|
|
<%= link_to "", cancel_or_collect_user_path(@user, :project => project.id), :class => "#{member.is_collect == 1 ? 'icons_project_favorite mt3' : 'icons_project_star mt3'}",:target => '_blank', :remote => true, :title => "#{member.is_collect == 1 ? '点击将其从个人主页的班级列表中移除' : '点击将其添加至个人主页的班级列表中'}" %>
|
2016-08-25 11:30:47 +08:00
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<% if member %>
|
2016-08-25 15:55:36 +08:00
|
|
|
<span class="<%= member.is_collect == 1 ? 'icons_project_favorite mt3' : 'icons_project_star mt3'%>"></span>
|
2016-08-25 11:30:47 +08:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|