<%= link_to image_tag(url_to_avatar(topic.author), :width=>"42",:height=>"42"), user_path(topic.author),:class =>'talkmain_pic fl' %>
<% author = topic.author.to_s %>
<%= link_to author, user_path(topic.author), :class =>"talkmain_name fl ",:title=>author,
:style=>'max-width:60px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;' %>
:
<%= h(topic.subject) %>
<% if topic.course_editable_by?(User.current) %>
<%= l(:button_edit) %>
<% end %>
<%= link_to(
l(:button_delete),
{:controller =>'messages',:action => 'destroy', :id => topic.id, :board_id => topic.board_id, :is_board=>'true'},
:method => :post,
:data => {:confirm => l(:text_are_you_sure)},
:class => 'talk_edit fr',
:style => ' margin-right: 10px;'
) if topic.destroyable_by?(User.current) %>
<% if topic.sticky? %>
<%= l(:label_board_sticky)%>
<% end %>
<%= topic.content.html_safe %>
[展开]
<%= link_to_attachments_course topic, :author => false %>
<%= l(:label_activity_time)%>: <%= format_time topic.created_on %>
<% reply = Message.new(:subject => "RE: #{@message.subject}")%>
<% if !topic.locked? && authorize_for('messages', 'reply') %>
<%= form_for reply, :as => :reply, :url => {:controller=>'messages',:action => 'reply', :id => topic.id, :board_id => topic.board_id, :is_board => 'true'},
:html => {:nhname=>"form",:multipart => true, :id => 'message_form' + topic.id.to_s, :name=>'message-form'} do |f| %>
<%= render :partial => 'form_project', :locals => {:f => f, :replying => true} %>
<% end %>
<% end %>
<% replies_all = topic.children.includes(:author, :attachments, {:board => :project}).
reorder("#{Message.table_name}.created_on DESC").all %>
<% unless replies_all.empty? %>
<% replies_all_i = 0 %>
<% replies_all.each do |message| %>
<% replies_all_i=replies_all_i+1 %>
-
<%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %>
<%= link_to_user_header message.author,false,:class => 'fl c_orange ' %>
<%= textAreailizable message,:content,:attachments => message.attachments %>
<%= format_time(message.created_on) %>
<%= link_to(
l(:button_delete),
{:controller => 'messages', :action => 'destroy', :id => message.id, :board_id => message.board_id, :is_board => 'true'},
:method => :post,
:data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete),
:class => ' c_dblue fr'
) if message.course_destroyable_by?(User.current) %>
<%= link_to(
l(:button_reply),
'javascript:;',
:nhname =>'showbtn_child_reply',
:class => ' c_dblue fr',
:style => 'margin-right: 10px;',
:title => l(:button_reply)) if !topic.locked? && authorize_for('messages', 'reply') %>
<% end %>
<%if topic.replies_count>2 %>
<% end %>
<% end %>