<% if topic.project %>
    <%#= board_breadcrumb(@message) %>
      <!--<h3><%#= avatar(@topic.author, :size => "24") %><span style = "width:100%;word-break:break-all;word-wrap: break-word;"><%#=h @topic.subject %></span></h3>-->
      <div class="talk_new ml15">
        <ul>
            <%= form_for topic, { :as => :message,
                             :url => {:controller => 'messages',:action => 'edit', :is_board => 'true',:id => topic.id, :board_id => topic.board_id},
                             :html => {:multipart => true, :name=>'message-form',
                             :id => 'message-form' + topic.id.to_s,
                             :method => :post,:nhname=>'form'}
                           } do |f| %>
            <%= render :partial => 'form_project',
                     :locals => {:f => f, :replying => !topic.parent.nil?, :topic => topic} %>
            <div class="ml55 fl" nhname="toolbar_container"></div>
            <a href="javascript:void(0)" nhname='cancelbtn' class="blue_btn grey_btn fr c_white ml10"><%= l(:button_cancel) %></a>
            <a href="javascript:void(0)" nhname='submitbtn' class="blue_btn fr c_white" ><%= l(:button_submit)%></a>
          <%#= link_to l(:button_cancel), board_message_url(topic.board, topic.root, :r => (topic.parent_id && topic.id)), :class => "blue_btn grey_btn fl c_white"  %>
        </ul>
      </div>
      <% end %>
<% elsif topic.course %>
    <%#= course_board_breadcrumb(@message) %>
      <div class="talk_new ml15">
        <ul>
          <%= form_for topic, {
                                       :as => :message,
                                       :url => {:controller => 'messages',:action => 'edit', :is_board => 'true',:id => topic.id, :board_id => topic.board_id},
                                       :html => {:multipart => true, :name=>'message-form',
                                                 :id => 'message-form' + topic.id.to_s,
                                                 :method => :post,:nhname=>'form'}
                               } do |f| %>
              <%= render :partial => 'form_course',
                         :locals => {:f => f, :replying => !topic.parent.nil?, :topic => topic} %>
              <div class="ml55 fl" nhname="toolbar_container"></div>
              <a href="javascript:void(0)"  nhname='cancelbtn' class="blue_btn grey_btn fr c_white ml10"><%= l(:button_cancel) %></a>
              <a href="javascript:void(0)"  nhname='submitbtn' class="blue_btn fr c_white"><%= l(:button_submit)%></a>

        <% end %>
        </ul>
      </div>
<% end %>


<div id="preview" class="wiki"></div>