2015-10-15 16:17:48 +08:00
|
|
|
<% if @message.project %>
|
|
|
|
<%= form_for @message, {:as => :message,
|
2015-12-31 17:53:05 +08:00
|
|
|
:url => {:action => 'edit',:is_course=>@is_course,:is_board=>@is_board},
|
2015-10-15 16:17:48 +08:00
|
|
|
:html => {:multipart => true,
|
|
|
|
:id => 'message-form',
|
|
|
|
:method => :post}
|
|
|
|
} do |f| %>
|
2015-12-24 11:58:00 +08:00
|
|
|
<%= render :partial => 'boards/project_message_edit',
|
|
|
|
:locals => {:f => f, :edit_mode => true, :topic => @message, :project => @message.project} %>
|
|
|
|
<!--<a href="#" onclick="submitProjectsBoard();" class="blue_btn fl c_white"><%#= l(:button_submit) %></a>-->
|
|
|
|
<%#= link_to l(:button_cancel), board_message_url(@message.board, @message.root, :r => (@message.parent_id && @message.id)), :class => "blue_btn grey_btn fl c_white" %>
|
2015-10-15 16:17:48 +08:00
|
|
|
<% end %>
|
2015-12-24 11:58:00 +08:00
|
|
|
|
2014-06-18 16:45:33 +08:00
|
|
|
<% elsif @message.course %>
|
2016-03-17 15:03:34 +08:00
|
|
|
<div nhname="topic_form">
|
2015-10-15 16:17:48 +08:00
|
|
|
<%= form_for @message, {
|
|
|
|
:as => :message,
|
2015-12-31 17:53:05 +08:00
|
|
|
:url => {:action => 'edit',:is_course=>@is_course,:is_board=>@is_board},
|
2015-10-15 16:17:48 +08:00
|
|
|
:html => {:multipart => true,
|
|
|
|
:id => 'message-form',
|
|
|
|
:method => :post}
|
|
|
|
} do |f| %>
|
|
|
|
<%= render :partial => 'boards/course_message_edit',
|
2015-10-20 15:15:18 +08:00
|
|
|
:locals => {:f => f, :edit_mode => true, :topic => @message, :course => @message.course} %>
|
2015-10-15 16:17:48 +08:00
|
|
|
<% end %>
|
2016-03-17 15:03:34 +08:00
|
|
|
</div>
|
2016-12-30 16:37:20 +08:00
|
|
|
<% elsif @message.contest %>
|
|
|
|
<div nhname="topic_form">
|
|
|
|
<%= form_for @message, {
|
|
|
|
:as => :message,
|
|
|
|
:url => {:action => 'edit',:is_course=>@is_course,:is_board=>@is_board},
|
|
|
|
:html => {:multipart => true,
|
|
|
|
:id => 'message-form',
|
|
|
|
:method => :post}
|
|
|
|
} do |f| %>
|
|
|
|
<%= render :partial => 'boards/contest_message_edit',
|
|
|
|
:locals => {:f => f, :edit_mode => true, :topic => @message, :contest => @message.contest} %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2015-12-30 15:46:01 +08:00
|
|
|
<% elsif @message.board.org_subfield %>
|
|
|
|
<%= form_for @message, {
|
|
|
|
:as => :message,
|
|
|
|
:url => {:action => 'edit'},
|
|
|
|
:html => {:multipart => true,
|
|
|
|
:id => 'message-form',
|
|
|
|
:method => :post}
|
|
|
|
} do |f| %>
|
|
|
|
<%= render :partial => 'boards/org_subfield_message_edit',
|
|
|
|
:locals => {:f => f, :edit_mode => true, :topic => @message, :org_subfield => @message.board.org_subfield} %>
|
|
|
|
<% end %>
|
2014-06-18 16:45:33 +08:00
|
|
|
<% end %>
|
2013-08-01 10:33:49 +08:00
|
|
|
|
|
|
|
<div id="preview" class="wiki"></div>
|