socialforge/app/views/praise_tread/_praise.html.erb

13 lines
882 B
Plaintext
Raw Normal View History

2016-04-24 12:48:03 +08:00
<% if PraiseTread.praised(activity) %>
2016-04-27 16:25:17 +08:00
<a href='<%= praise_tread_praise_plus_path({:obj_id=>activity.id,:obj_type=>activity.class,:user_activity_id=>user_activity_id,:type=>type }) %>' data-remote="true" class="<%=type == 'reply'? 'fr' : 'ml15' %> likeButton" title="点赞" >
<span class="likeText">赞</span>
<% num = get_praise_num(activity) %>
<span class="likeNum"><%= num > 0 ? "#{num}" : "" %></span>
</a>
2016-01-13 16:32:05 +08:00
<% else %>
2016-04-27 16:25:17 +08:00
<a href='<%= praise_tread_praise_minus_path({:obj_id=>activity.id,:obj_type=>activity.class,:user_activity_id=>user_activity_id,:type=>type }) %>' data-remote="true" class="<%=type == 'reply'? 'fr' : 'ml15' %> likeButton" title="取消点赞" >
<span class="likeText">已赞</span>
<% num = get_praise_num(activity) %>
<span class="likeNum"><%= num > 0 ? "#{num}" : "" %></span>
</a>
2016-01-13 16:32:05 +08:00
<% end %>