<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %> <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
<%= link_to activity.author.show_name, user_path(activity.author_id), :class => "newsBlue mr15" %> TO <%= link_to activity.project.name.to_s+" | 项目讨论区",project_boards_path(activity.project), :class => "newsBlue ml15 mr5"%>
<% if activity.parent_id.nil? %> <%= link_to activity.subject.to_s.html_safe, board_message_path(activity.board,activity), :class=> "postGrey fl" %> <% else %> <%= link_to activity.parent.subject.to_s.html_safe, board_message_path(activity.board,activity), :class=> "postGrey fl" %> <% end %> <% if activity.sticky == 1%> 置顶 <% end%> <% if activity.locked %>        <% end%>
发帖时间:<%= format_time(activity.created_on) %>
更新时间:<%= get_forge_act_message(activity, activity.class.to_s) %>
<% if activity.parent_id.nil? %> <% content = activity.content%> <% else %> <% content = activity.parent.content%> <% end %> <%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>content} %>
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
<% if User.current.logged? %>
    • <% if activity.author.id == User.current.id%>
    • <%= link_to( l(:button_edit), edit_board_message_path(activity.id,:board_id=>activity.board_id,:is_course=>is_course,:is_board=>is_board), :class => 'postOptionLink' ) if activity.editable_by?(User.current) %>
    • <%= link_to( l(:button_delete), delete_board_message_path(activity.id,:board_id=>activity.board_id,:is_course=>is_course,:is_board=>is_board), :method => :post, :data => {:confirm => l(:text_are_you_sure)}, :class => 'postOptionLink' ) if activity.destroyable_by?(User.current) %>
    • <% end %> <% if hidden_unproject_infos %>
    • <%= link_to "发送", "javascript:void(0);", :onclick => "show_send(#{activity.id}, #{User.current.id}, 'message');", :class => "postOptionLink" %>
    • <% else %>
    • <%= link_to "发送", "javascript:void(0);", :onclick => "show_send_hidden(#{activity.id}, #{User.current.id}, 'message');", :class => "postOptionLink" %>
    • <% end %>
<% end %>
<% all_comments = []%> <% all_replies = get_all_children(all_comments, activity) %> <% count = all_replies.count %> <%# allow_delete = (activity.user == User.current || User.current.admin? || User.current.allowed_to?(:as_teacher,activity.course)) %> <%# count = fetch_user_leaveWord_reply(activity).count %>
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id,:is_course => is_course,:is_board =>is_board} %> <% comments = all_replies[0..2] %> <% if count > 0 %>
<%= render :partial => 'users/message_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'Message', :activity_id =>activity.id, :is_course => is_course, :is_board =>is_board}%>
<% end %> <% if !activity.locked? %>
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
<% if User.current.logged? %>
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id,:is_course => is_course, :is_board => 'true'},:method => "post", :remote => true) do |f|%>

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