diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 10e5e6f06..698b0de48 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -563,6 +563,7 @@ class ApplicationController < ActionController::Base uri = URI.parse(back_url) # do not redirect user to another host or to the login or register page if (uri.relative? || (uri.host == request.host)) && !uri.path.match(%r{/(login|account/register)}) + back_url = back_url.gsub(%r{\/users\/(\d+)},"/users/"+default.id.to_s) redirect_to(back_url) return end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index a95559554..d6f343ba0 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -649,7 +649,7 @@ class UsersController < ApplicationController @user_activities = UserActivity.where("container_type = 'Project' and container_id in #{user_project_ids} and act_type = 'Message'").order('created_at desc').limit(10).offset(@page * 10) else @user_activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types}) or (container_type = 'Course' and container_id in #{user_course_ids}) and act_type in #{course_types}").order('created_at desc').limit(10).offset(@page * 10) - end + end else @user_activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types}) or (container_type = 'Course' and container_id in #{user_course_ids}) and act_type in #{course_types}").order('created_at desc').limit(10).offset(@page * 10) end diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb index 56e4bef5f..8dd0bd2bb 100644 --- a/app/views/layouts/_logined_header.html.erb +++ b/app/views/layouts/_logined_header.html.erb @@ -71,7 +71,7 @@ -
<%= comment.comments.html_safe %>
+
<%= comment.comments.html_safe %>
diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb index eb0341607..0ee4f30fb 100644 --- a/app/views/users/_project_issue.html.erb +++ b/app/views/users/_project_issue.html.erb @@ -119,7 +119,7 @@
<%= string %>
<% end %> <% else %> -
<%= reply.notes.html_safe %>
+
<%= reply.notes.html_safe %>
<% end %>
diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb index 3bdbda412..e60676ac6 100644 --- a/app/views/users/_project_message.html.erb +++ b/app/views/users/_project_message.html.erb @@ -103,7 +103,7 @@ ) if reply.course_destroyable_by?(User.current) %> -
<%= reply.content.html_safe %>
+
<%= reply.content.html_safe %>
diff --git a/app/views/users/_resource_share_for_project_popup.html.erb b/app/views/users/_resource_share_for_project_popup.html.erb index 4d377154e..e5d1732e4 100644 --- a/app/views/users/_resource_share_for_project_popup.html.erb +++ b/app/views/users/_resource_share_for_project_popup.html.erb @@ -1,6 +1,6 @@ -
+
将资源发送至
@@ -44,7 +44,7 @@ <%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();' %>
- +
<% end %> diff --git a/app/views/users/_resource_share_popup.html.erb b/app/views/users/_resource_share_popup.html.erb index 376d674cd..2fc515b4a 100644 --- a/app/views/users/_resource_share_popup.html.erb +++ b/app/views/users/_resource_share_popup.html.erb @@ -1,6 +1,6 @@ -
+
将资源发送至
@@ -44,7 +44,7 @@ <%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();' %>
- +
<% end %> diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb index 1cfeb7ed8..b43d0d54e 100644 --- a/app/views/users/_user_activities.html.erb +++ b/app/views/users/_user_activities.html.erb @@ -3,16 +3,16 @@