% if topic.project %>
<%#= board_breadcrumb(@message) %>
<%= 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} %>
<%= l(:button_cancel) %>
<%= l(:button_submit)%>
<%#= 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" %>
<% end %>
<% elsif topic.course %>
<%#= course_board_breadcrumb(@message) %>
<%= 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} %>
<%= l(:button_cancel) %>
<%= l(:button_submit)%>
<% end %>
<% end %>