1.修复回复贴吧信息错误后错误信息不及时清除的BUG

2.修复课程讨论区新建帖子跳转页面为回复的BUG
3.修复新建作业后报错的BUg
解决方案:路由错误
This commit is contained in:
sw 2014-09-17 12:31:53 +08:00
parent 245e0a858c
commit 98b6be61ba
3 changed files with 34 additions and 34 deletions

View File

@ -62,7 +62,7 @@ class MemosController < ApplicationController
format.html { redirect_to back_memo_url, notice: "#{l :label_memo_create_succ}" } format.html { redirect_to back_memo_url, notice: "#{l :label_memo_create_succ}" }
format.json { render json: @memo, status: :created, location: @memo } format.json { render json: @memo, status: :created, location: @memo }
else else
flash[:error] = "#{l :label_memo_create_fail}: #{@memo.errors.full_messages[0]}" flash.now[:error] = "#{l :label_memo_create_fail}: #{@memo.errors.full_messages[0]}"
# back_error_page = @memo.parent_id.nil? ? forum_path(@forum) : forum_memo_path(@forum, @memo.parent_id) # back_error_page = @memo.parent_id.nil? ? forum_path(@forum) : forum_memo_path(@forum, @memo.parent_id)
pre_count = REPLIES_PER_PAGE pre_count = REPLIES_PER_PAGE

View File

@ -3,44 +3,44 @@
<% replying ||= false %> <% replying ||= false %>
<div class="box ph10_5"> <div class="box ph10_5">
<!--[form:message]--> <!--[form:message]-->
<% unless replying %> <% unless replying %>
<p> <p><label for="message_subject"><%= l(:field_subject) %><span class="required"> *&nbsp;&nbsp;</span></label><br/>
<%= f.text_field :subject, :size => 60, :style => "width: 99%;display:none;", :id => "message_subject" %><!--by young--> <%= f.text_field :subject, :size => 60, :style => "width: 99%;", :id => "message_subject" %><!--by young-->
</p> </p>
<% else %> <% else %>
<p> <p><label for="message_subject"><%= l(:field_subject) %><span class="required"> *&nbsp;&nbsp;</span></label><br/>
<%= f.text_field :subject, :size => 60, :style => "width: 99%;display:none;", :id => "message_subject", :readonly => true %> <%= f.text_field :subject, :size => 60, :style => "width: 99%;", :id => "message_subject", :readonly => true %>
</p> </p>
<% end %> <% end %>
<p> <p>
<% unless replying %> <% unless replying %>
<% if @message.safe_attribute? 'sticky' %> <% if @message.safe_attribute? 'sticky' %>
<%= f.check_box :sticky %> <%= label_tag 'message_sticky', l(:label_board_sticky) %> <%= f.check_box :sticky %> <%= label_tag 'message_sticky', l(:label_board_sticky) %>
<% end %> <% end %>
<% if @message.safe_attribute? 'locked' %> <% if @message.safe_attribute? 'locked' %>
<%= f.check_box :locked %> <%= label_tag 'message_locked', l(:label_board_locked) %> <%= f.check_box :locked %> <%= label_tag 'message_locked', l(:label_board_locked) %>
<% end %> <% end %>
<% end %> <% end %>
</p> </p>
<p> <p>
<label for="message_subject"><%= l(:button_projects_feedback_respond) %> <label for="message_subject"><%= l(:field_description) %>
<span class="required"> *&nbsp;&nbsp;</span></label> <span class="required"> *&nbsp;&nbsp;</span></label>
<div id="message_quote" class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;"></div> <div id="message_quote" class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;"></div>
<%= text_area :quote,:quote,:style => 'display:none' %> <%= text_area :quote,:quote,:style => 'display:none' %>
</p> </p>
<p> <p>
<%= label_tag "message_content", l(:description_message_content), :class => "hidden-for-sighted" %> <%= label_tag "message_content", l(:description_message_content), :class => "hidden-for-sighted" %>
<%= f.text_area :content, :cols => 80, :rows => 13, :class => 'wiki-edit', :id => 'message_content' %> <%= f.text_area :content, :cols => 80, :rows => 13, :class => 'wiki-edit', :id => 'message_content' %>
</p> </p>
<!--[eoform:message]--> <!--[eoform:message]-->
<p> <p>
<%= l(:label_attachment_plural) %> <%= l(:label_attachment_plural) %>
<br /> <br />
<%= render :partial => 'attachments/form_course', :locals => {:container => @message,:isReply => @isReply} %> <%= render :partial => 'attachments/form_course', :locals => {:container => @message,:isReply => @isReply} %>
</p> </p>
</div> </div>

View File

@ -724,7 +724,7 @@ RedmineApp::Application.routes.draw do
# added by young # added by young
match 'calls', :to => 'bids#index' match 'calls', :to => 'bids#index'
match 'calls/:id', :to => 'bid#show', :as => 'respond' match 'calls/:id', :to => 'bids#show', :as => 'respond'
# modified by longjun # modified by longjun
# bids#contests is not exist # bids#contests is not exist
# match 'contest', :to => 'bids#contests', :as => 'contest' #modified @20140403 # match 'contest', :to => 'bids#contests', :as => 'contest' #modified @20140403