diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 1613939cd..726dfe50b 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -449,7 +449,7 @@ class UsersController < ApplicationController end @jour = paginateHelper jours,10 @state = false - render :layout=>'base_users_new' + render :layout=>'new_base_user' end def user_comments @@ -659,6 +659,8 @@ class UsersController < ApplicationController @type = params[:type] user_project_ids = @user.projects.visible.empty? ? "(-1)" : "(" + @user.projects.visible.map{|project| project.id}.join(",") + ")" user_course_ids = @user.courses.visible.empty? ? "(-1)" : "(" + @user.courses.visible.map{|course| course.id}.join(",") + ")" + course_types = "('Message','News','HomeworkCommon')" + project_types = "('Message','Issue')" if @type case @type when "course_homework" @@ -667,14 +669,16 @@ class UsersController < ApplicationController @user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'News'").order('created_at desc').limit(10).offset(@page * 10) when "course_message" @user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'Message'").order('created_at desc').limit(10).offset(@page * 10) + when "course_poll" + @user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'Poll'").order('created_at desc').limit(10).offset(@page * 10) when "project_issue" @user_activities = UserActivity.where("container_type = 'Project' and container_id in #{user_project_ids} and act_type = 'Issue'").order('created_at desc').limit(10).offset(@page * 10) when "project_message" @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 else - course_types = "('Message','News','HomeworkCommon')" - project_types = "('Message','Issue')" @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 # @user_activities = paginateHelper @user_activities,500 diff --git a/app/views/account/login.html.erb b/app/views/account/login.html.erb index 519b6c1a3..85db7f695 100644 --- a/app/views/account/login.html.erb +++ b/app/views/account/login.html.erb @@ -66,7 +66,7 @@ } function register(){ - if($login_correct && $mail_correct && $passwd_correct && $passwd_comfirm_correct){ + if($login_correct && $mail_correct && $passwd_correct && $passwd_comfirm_correct && $("#read_and_confirm").attr("checked") == 'checked'){ $("#main_reg_form").submit(); }else{ $('#user_login').blur(); @@ -242,6 +242,11 @@ <%= f.text_field :login, :size => 25,:placeholder=>"请输入用户昵称",:class=>'loginSignBox'%>
++ + <%= l(:label_cancel_with_space) %> + + + <%= l(:label_comment_with_space) %> + +
+ <% end %> +