<% count=activity.journals_for_messages.count %> <% comments = activity.journals_for_messages.reorder("created_on desc") %> <% no_children_comments = get_no_children_comments comments %>
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :expand_more =>no_children_comments[:three_more]} %> <% if count > 0 %>
<%=render :partial => 'users/news_replies', :locals => {:comments => no_children_comments[:no_children_comments], :type => 'HomeworkCommon', :is_teacher => is_teacher, :user_activity_id => user_activity_id, :activity_id => activity.id} %>
<% end %>
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), :alt => "用户头像" %>
<% if User.current.logged? %>
<%= form_for('new_form',:url => {:controller => 'words', :action => 'leave_homework_message', :id => activity.id},:method => "post", :remote => true) do |f|%> <%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %>

<% end%>
<% else %> <%= render :partial => "users/show_unlogged" %> <% end %>