You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pgfqe6ch8/app/views/messages/edit.html.erb

56 lines
3.0 KiB

<% if @message.project %>
<%= 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/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" %>
<% end %>
<% elsif @message.course %>
<div class="edu-class-container edu-position">
<p class="mb10 font-14">
<%= link_to User.current.show_real_name, user_path(User.current),:class => "color-grey-9" %> &gt;
<%= link_to "课堂", courses_path(),:class => "color-grey-9" %> &gt;
<%= link_to @course.name, course_path(@course), :title => "班级",:class => "color-grey-9" %> &gt; <%= link_to @board.name, course_boards_path(@course, :board_id => @board.id),:class => "color-grey-9" %>
</p>
<div class="edu-con-top box_bg_shandow bor-grey-e">
<p class="ml15 color-grey">编辑帖子</p>
</div>
<div class="panel-content-box clearfix mt15 box_bg_shandow bor-grey-e">
<%= form_for @message, :url => update_board_message_path(@message.board_id, @message), :html => {:id => 'message-form'} do |f| %>
<%= render :partial => "form_course", :locals => {:f => f} %>
<% end %>
</div>
</div>
<% 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>
<% 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 %>
<% end %>