<% if User.current.logged? %>
<% @is_valuate = is_praise_or_tread(obj,user_id)%> <% if @is_valuate.size > 0 %> <% @flag = @is_valuate.first.praise_or_tread %> <% if @flag == 1 %>
<%= image_tag("/images/praise_tread/praise_true.png") %>
<%= get_praise_num(obj)%>
<%= image_tag("/images/praise_tread/tread_false.png") %>
<% elsif @flag == 0 %>
<%= image_tag("/images/praise_tread/praise_false.png") %>
<%= get_praise_num(obj)%>
<%= image_tag("/images/praise_tread/tread_true.png") %>
<% end %> <% else %>
<%= link_to image_tag("/images/praise_tread/praise_false.png"), :controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class%>
<%= get_praise_num(obj)%>
<%= link_to image_tag("/images/praise_tread/tread_false.png"),:controller=>"praise_tread", :action=>"tread_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class %>
<% end %>
<% end %>