2015-09-18 17:44:16 +08:00
|
|
|
<!-- get_praise_num(obj,1)函数中 1代表返回顶得次数 0返回踩的次数 -->
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
<% if horizontal %>
|
|
|
|
<!-- 横排 -->
|
2015-09-29 13:54:54 +08:00
|
|
|
<div id="praise_tread_<%= obj.id %>" style="float:right; " >
|
2015-09-18 17:44:16 +08:00
|
|
|
<% @is_valuate = is_praise_or_tread(obj,user_id)%>
|
|
|
|
<% if @is_valuate.size > 0 %> <!-- 评价过 1代表赞 0代表踩 -->
|
|
|
|
<% @flag = @is_valuate.first.praise_or_tread %>
|
|
|
|
<% if @flag == 1 %> <!-- 顶过 --><!-- modified by bai -->
|
2015-09-29 17:16:53 +08:00
|
|
|
<a href="javascript:void(0);" class="<%= obj.author.id == User.current.id ? 'linkGrey2 postLikeIcon mr30':'linkGrey2 postLikeIcon' %>" title="<%= l(:label_issue_praise_over)%>" > <%= get_praise_num(obj)%></a>
|
2015-09-18 17:44:16 +08:00
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<% if user_id == obj.author_id %>
|
|
|
|
|
|
|
|
<!--<%#= image_tag "/images/praise_tread/praise_true.png" , weight:"22px", height:"22px",:title => l(:label_issue_not_praise_over) %>-->
|
2015-09-29 16:01:01 +08:00
|
|
|
<a href="javascript:void(0);" class="linkGrey2 postLikeIcon mr30" title="<%= l(:label_issue_not_praise_over)%>" > <%= get_praise_num(obj)%></a>
|
2015-09-18 17:44:16 +08:00
|
|
|
|
|
|
|
<% else %>
|
|
|
|
<!-- 积分少于2分不能踩帖 -->
|
|
|
|
<%# if OptionNumber.get_user_option_number(user_id).nil? || OptionNumber.get_user_option_number(user_id).total_score < 2 %>
|
|
|
|
|
|
|
|
<%#= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)),
|
|
|
|
:controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class,:horizontal => horizontal %>
|
|
|
|
<a href="<%= praise_tread_praise_plus_path({:obj_id=>obj.id,:obj_type=>obj.class,:horizontal => horizontal })%>" data-remote="true" class="linkGrey2 postLikeIcon" title="<%= l(:label_issue_praise)%>" > <%= get_praise_num(obj)%></a>
|
|
|
|
<!--<%# else %>-->
|
|
|
|
|
|
|
|
<!--<%#= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)),-->
|
|
|
|
<!--:controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class,:horizontal => horizontal %>-->
|
|
|
|
<!--<a href="javascript:void(0);" class="linkGrey2 postLikeIcon" title="<%#= l(:label_issue_praise)%>" target="_blank"> <%#= get_praise_num(obj)%></a>-->
|
|
|
|
|
|
|
|
<!--<%# end %>-->
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|