diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index c46c039ce..21653b3e4 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -500,10 +500,6 @@ class ApplicationController < ActionController::Base
#��ȡ�γ�
def find_course
@course= Course.find(params[:id])
- if @course.is_delete == 1 and !User.current.admin?
- render_404
- return
- end
rescue ActiveRecord::RecordNotFound
render_404
end
diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb
index 2e71f7340..95fcee95e 100644
--- a/app/controllers/messages_controller.rb
+++ b/app/controllers/messages_controller.rb
@@ -345,7 +345,7 @@ class MessagesController < ApplicationController
elsif @message.parent
redirect_to board_message_url(@board, @message.parent, :r => r)
else
- redirect_to course_boards_path(@course)
+ redirect_to course_boards_path(@course, :board_id => @board.id)
end
elsif @contest
if params[:is_course] && params[:is_course].to_i == 0
@@ -357,7 +357,7 @@ class MessagesController < ApplicationController
elsif @message.parent
redirect_to board_message_url(@board, @message.parent, :r => r)
else
- redirect_to contest_boards_path(@contest)
+ redirect_to contest_boards_path(@contest, :board_id => @board.id)
end
elsif @org_subfield
if params[:is_board]
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 8293f437a..e0c8f834a 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -4193,7 +4193,7 @@ end
end
respond_to do |format|
format.js
- format.html {render :layout => 'new_base_user'}
+ format.html {render :layout => 'base_course_community'}
end
end
end
diff --git a/app/views/contests/_boards.html.erb b/app/views/contests/_boards.html.erb
index e4d56afb9..59fa17596 100644
--- a/app/views/contests/_boards.html.erb
+++ b/app/views/contests/_boards.html.erb
@@ -3,15 +3,16 @@
<%= form_tag url_for(:controller => 'boards', :action => 'create', :contest_id => @contest.id, :board_id => board.id), :id=> 'add_board_form_subboard',:remote => true do %>
-
取消
-
+
<% end %>
@@ -33,7 +34,8 @@
<%=board.name %>
-
+
|
diff --git a/app/views/contests/_upload_img.html.erb b/app/views/contests/_upload_img.html.erb
index 6c54e6a7a..6d8c4c10f 100644
--- a/app/views/contests/_upload_img.html.erb
+++ b/app/views/contests/_upload_img.html.erb
@@ -6,7 +6,7 @@
- 上传图片
+ 上传图片
<%= file_field_tag 'avatar[image]',
:id => "upload_avatar",
:style => 'display:none;',#added by young
diff --git a/app/views/layouts/_show_messages_list.html.erb b/app/views/layouts/_show_messages_list.html.erb
index a3ec254d3..557d96841 100644
--- a/app/views/layouts/_show_messages_list.html.erb
+++ b/app/views/layouts/_show_messages_list.html.erb
@@ -172,6 +172,14 @@
<% content = ' '+User.find(ma.applied_user_id).show_name+' 申诉匿评成绩:'+"“"+homework.name+"”" %>
<%= link_to content.html_safe, student_work_index_path(:homework => homework.id, :show_work_id => ma.applied.student_works_score.student_work_id, :tab => 2), :title => "#{User.find(ma.applied_user_id).show_name}申诉匿评成绩:“#{homework.name}”", :target => '_blank' %>
+ <% elsif ma.applied_type == "AppliedContest" %>
+
+ <% applied_contest = ma.applied %>
+ <% contest = Contest.find applied_contest.contest_id %>
+ <% message_user = User.find(applied_contest.user_id) %>
+ <% content = ''+message_user.show_name+' '+(message_user.user_extensions.school_id.blank? ? "" : "来自")+message_user.user_extensions.school.name+","+'申请以"'+ get_role_str(ma.role) + '"的身份加入竞赛:' + contest.name%>
+ <%= link_to content.html_safe, contest_path(contest.id), :title => "#{message_user.show_name} #{message_user.user_extensions.school_id.blank? ? '' : '来自'+message_user.user_extensions.school.name},申请以'#{get_role_str(ma.role)}'的身份加入竞赛:#{contest.name}", :target => '_blank' %>
+
<% end %>
<% elsif ma.class == ForgeMessage %>
<% if ma.forge_message_type == "AppliedProject" %>
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index ba9d205ce..479905d3c 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -1572,7 +1572,7 @@ function pop_box_new(value, Width, Height){
new Drag("popupWrap");
- $("#popupWrap input, #popupWrap textarea, #popupWrap ul").mousedown(function(event){
+ $("#popupWrap input, #popupWrap textarea, #popupWrap ul, #popupWrap a").mousedown(function(event){
event.stopPropagation();
new Drag("popupWrap");
});
|