socialforge/app/views/praise_tread/praise_plus.js.erb

16 lines
938 B
Plaintext

<% if @obj_type == 'Memo'%>
$('#praise_tread_<%= @obj.id %>').html('<%= j(
render :partial => "/memos/praise_tread",:locals => {:obj => @obj,:user_id => User.current.id,:horizontal => @horizontal}
)%>');
<% elsif @activity %>
<% if @type.to_s == 'activity' %>
$('#praise_count_<%=@user_activity_id %>').html('<%=j(render :partial=> "praise_tread/praise", :locals => {:activity=>@obj, :user_activity_id=>@user_activity_id,:type=>"activity"})%>');
<% else @type.to_s == 'reply' %>
$('#reply_praise_count_<%=@user_activity_id %>').html('<%=j(render :partial=> "praise_tread/praise", :locals => {:activity=>@obj, :user_activity_id=>@user_activity_id,:type=>"reply"})%>');
<% end %>
<% else %>
$('#praise_tread_<%= @obj.id %>').html('<%= j(
render :partial => "/praise_tread/praise_tread",:locals => {:obj => @obj,:user_id => User.current.id,:horizontal => @horizontal}
)%>');
<% end %>