diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index d7e4af7ab..dc9b11aee 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1729,7 +1729,7 @@ class UsersController < ApplicationController # end # end @state = false - render :layout=>'new_base_user' + render :layout => 'edu_new_base_user' end #给某人留言 @@ -2128,13 +2128,22 @@ class UsersController < ApplicationController @user_fanlist = fan_query.order("#{Watcher.table_name}.id desc").limit(12); @courses = @user.courses.visible.not_deleted_not_end @courses_count = @courses.count - @courses = @courses.select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS updatetime").order("updatetime desc").limit(8) + @courses = @courses.select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS updatetime").order("updatetime desc") + @limit = 8 + @is_remote = true + @courses_pages = Paginator.new @courses_count, @limit, params['page'] || 1 + @offset ||= @courses_pages.offset + @courses = paginateHelper @courses, @limit + if @user == User.current @shixuns = @user.shixuns else @shixuns = @user.shixuns.where(:authentication => 1) end @shixuns_count = @shixuns.count + @shixuns_pages = Paginator.new @shixuns_count, @limit, params['page'] || 1 + @offset ||= @shixuns_pages.offset + @shixuns = paginateHelper @shixuns, @limit # if User.current == @user # # 点击小铃铛,更新点击时间 # update_onclick_time if params[:click_user_message] == 'true' diff --git a/app/views/challenges/_form.html.erb b/app/views/challenges/_form.html.erb index c36337ab7..841c5a950 100644 --- a/app/views/challenges/_form.html.erb +++ b/app/views/challenges/_form.html.erb @@ -28,7 +28,11 @@ toolbarIcons : function() { // Or return editormd.toolbarModes[name]; // full, simple, mini // Using "||" set icons align right. - return ["bold", "italic", "|", "list-ul", "list-ol", "|", "image", "code", "code-block", "|", "table", "watch", "clear"] + return ["bold", "italic", "|", "list-ul", "list-ol", "|", "code", "code-block", "|", "testIcon", "testIcon1", '|', "image", "table", '|', "watch", "clear" ] + }, + toolbarCustomIcons : { + testIcon : "", + testIcon1 : "" }, //这个配置在simple.html中并没有,但是为了能够提交表单,使用这个配置可以让构造出来的HTML代码直接在第二个隐藏的textarea域中,方便post提交表单。 saveHTMLToTextarea : true, @@ -50,7 +54,11 @@ toolbarIcons : function() { // Or return editormd.toolbarModes[name]; // full, simple, mini // Using "||" set icons align right. - return ["bold", "italic", "|", "list-ul", "list-ol", "|", "image", "code", "code-block", "|", "table", "watch", "clear"] + return ["bold", "italic", "|", "list-ul", "list-ol", "|", "code", "code-block", "|", "testIcon", "testIcon1", '|', "image", "table", '|', "watch", "clear" ] + }, + toolbarCustomIcons : { + testIcon : "", + testIcon1 : "" }, //这个配置在simple.html中并没有,但是为了能够提交表单,使用这个配置可以让构造出来的HTML代码直接在第二个隐藏的textarea域中,方便post提交表单。 saveHTMLToTextarea : true, @@ -61,7 +69,6 @@ imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp", "JPG", "JPEG", "GIF", "PNG", "BMP", "WEBP"], imageUploadURL : "<%= upload_with_markdown_path(:container_id => @shixun.id, :container_type => @shixun.class) %>"//url }); - }); @@ -160,7 +167,7 @@ <% end %>
- + + 编辑
diff --git a/app/views/games/_code_actions.html.erb b/app/views/games/_code_actions.html.erb index 347a707ee..d65ce362f 100644 --- a/app/views/games/_code_actions.html.erb +++ b/app/views/games/_code_actions.html.erb @@ -116,6 +116,7 @@ latest_output: data.latest_output }); $("#game_test_set_results").html(html); + $("#blacktab_nav_1").trigger("click"); if(data.status == 2){ clearInterval(cm); clearInterval(intId); diff --git a/app/views/games/_game_results.html.erb b/app/views/games/_game_results.html.erb index 7141bcb29..90df28e23 100644 --- a/app/views/games/_game_results.html.erb +++ b/app/views/games/_game_results.html.erb @@ -115,6 +115,7 @@ } ); $("#game_test_set_results").html(html); + $("#blacktab_nav_1").trigger("click"); }); // 公开的测试集允许展开与隐藏 function toggle_test_case(t_case, id){ diff --git a/app/views/layouts/_footer.html.erb b/app/views/layouts/_footer.html.erb index 93190e9b9..aeee200fc 100644 --- a/app/views/layouts/_footer.html.erb +++ b/app/views/layouts/_footer.html.erb @@ -3,8 +3,8 @@