<% if User.current.language == "zh"%> <%= h @board.name %> <% else %> <%= l(:project_module_boards) %> <% end %>

<% if User.current.logged? %> <%= l(:label_message_new) %> <% end %>
<% if !User.current.logged?%>
<%= l(:label_user_login_course_board) %> <%= link_to l(:label_user_login_new), signin_path %>
<% end %>

讨论区共有<%= @topic_count %>个帖子

<% if @topics.any? %> <% @topics.each do |topic| %>
<%= 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 %>
<%= l(:button_reply) %>
<% reply = Message.new(:subject => "RE: #{topic.subject}")%> <% if !topic.locked? && authorize_for('messages', 'reply') %> <% 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;', 'data-topic-id' =>message.id, :title => l(:button_reply)) if !topic.locked? && authorize_for('messages', 'reply') %>
  • <% end %>
<%if topic.replies_count>2 %> <% end %> <% end %>
<% end %> <% else %>

<%= l(:label_no_data) %>

<% end %> <%# other_formats_links do |f| %> <%#= f.link_to 'Atom', :url => {:key => User.current.rss_key} %> <%# end %> <% html_title @board.name %> <% content_for :header_tags do %> <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@course}: #{@board}") %> <% end %>