diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 51feecb23..9cf69504b 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -410,12 +410,12 @@ class UsersController < ApplicationController visible_course_ids = visible_course.empty? ? "(-1)" : "(" + visible_course.map{|course| course.id}.join(",") + ")" @homeworks = HomeworkCommon.where("course_id in #{visible_course_ids}").order("created_at desc") @type = params[:type] - @limit = 10 + @limit = 15 @is_remote = true @hw_count = @homeworks.count @hw_pages = Paginator.new @hw_count, @limit, params['page'] || 1 @offset ||= @hw_pages.offset - @homeworks = paginateHelper @homeworks,10 + @homeworks = paginateHelper @homeworks,15 respond_to do |format| format.js end @@ -431,12 +431,12 @@ class UsersController < ApplicationController @homeworks = HomeworkCommon.where(:user_id => @user.id).order("created_at desc") end @type = params[:type] - @limit = 10 + @limit = 15 @is_remote = true @hw_count = @homeworks.count @hw_pages = Paginator.new @hw_count, @limit, params['page'] || 1 @offset ||= @hw_pages.offset - @homeworks = paginateHelper @homeworks,10 + @homeworks = paginateHelper @homeworks,15 respond_to do |format| format.js end @@ -460,12 +460,12 @@ class UsersController < ApplicationController @homeworks = HomeworkCommon.where("user_id = #{@user.id} and (name like '%#{search}%')").order("created_at desc") end @type = params[:type] - @limit = 10 + @limit = 15 @is_remote = true @hw_count = @homeworks.count @hw_pages = Paginator.new @hw_count, @limit, params['page'] || 1 @offset ||= @hw_pages.offset - @homeworks = paginateHelper @homeworks,10 + @homeworks = paginateHelper @homeworks,15 respond_to do |format| format.js end diff --git a/app/views/users/_show_user_homework_form.html.erb b/app/views/users/_show_user_homework_form.html.erb index bd70e27fb..b316093c3 100644 --- a/app/views/users/_show_user_homework_form.html.erb +++ b/app/views/users/_show_user_homework_form.html.erb @@ -3,9 +3,19 @@ +
  • + <% case homework.homework_type %> + <% when 1 %> + 普通 + <% when 2 %> + 编程 + <% when 3 %> + 分组 + <% end %> +
  • <%= homework.user.show_name %>
  • <%=format_date homework.publish_time %>
  • diff --git a/app/views/users/_show_user_homeworks.html.erb b/app/views/users/_show_user_homeworks.html.erb index ad1fcdf7a..f013705c5 100644 --- a/app/views/users/_show_user_homeworks.html.erb +++ b/app/views/users/_show_user_homeworks.html.erb @@ -10,13 +10,14 @@
    <%= form_tag(user_select_homework_users_path, :multipart => true,:remote => true,:name=>"select_homework_form",:id=>'select_homework_form') do %> -
    +
    <%= render :partial => 'users/show_user_homework_form', :locals => {:homeworks => @homeworks}%>
    <% end %> diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 409b914b4..3f5c21567 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -1442,14 +1442,15 @@ a.subjectChoose {padding:8px 20px; background-color:#f1f1f1; color:#888888;} a.chooseActive {background-color:#269ac9; color:#ffffff;} .subjectBanner {width:585px; height:40px; background-color:#f1f1f1; border-top:1px solid #eaeaea; color:#7a7a7a; font-size:14px;} .subjectBanner li {height:40px; line-height:40px; vertical-align:middle;} -.subjectName {width:360px; padding-left:10px;} +.subjectName {width:260px; padding-left:10px;} +.subjectType {width:100px; text-align:center;} .subjectPublisher {width:100px; text-align:center;} .subjectDate {width:115px; text-align:center;} -.subjectRow {width:585px; height:40px; color:#7a7a7a; font-size:12px;} -.subjectRow li {height:40px; line-height:40px; vertical-align:middle;} +.subjectRow {width:585px; height:30px; color:#7a7a7a; font-size:12px;} +.subjectRow li {height:30px; line-height:30px; vertical-align:middle;} .subjectSearch {border:1px solid #dddddd; height:32px; width:250px;outline: none;} .subjectInfo {width:385px; background-color:#f1f1f1; border:1px solid #dddddd; height:32px; line-height:32px; vertical-align:middle; text-align:center; color:#7a7a7a;} -.subjectWrap {border:1px solid #dddddd; border-top:none; padding:10px; width:365px; height:460px; overflow-y:auto;} +.subjectWrap {border:1px solid #dddddd; border-top:none; padding:10px; width:365px; height:470px; overflow-y:auto;} .subjectIntro {color:#585858; line-height:18px; font-size:12px;} .subjectContent {color:#888888; line-height:18px; font-size:12px;} .popupClose {background:url(../images/resource_icon_list.png) 0px -40px no-repeat; width:20px; height:20px; display:inline-block; position: absolute; z-index: 1000; right:10px; top:5px;} diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 611e96a2c..2d6bad0a1 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -1027,13 +1027,14 @@ a.chooseActive {background-color:#269ac9; color:#ffffff;} .subjectBanner {width:585px; height:40px; background-color:#f1f1f1; border-top:1px solid #eaeaea; color:#7a7a7a; font-size:14px;} .subjectBanner li {height:40px; line-height:40px; vertical-align:middle;} .subjectName {width:360px; padding-left:10px;} +.subjectType {width:100px; text-align:center;} .subjectPublisher {width:100px; text-align:center;} .subjectDate {width:115px; text-align:center;} -.subjectRow {width:585px; height:40px; color:#7a7a7a; font-size:12px;} -.subjectRow li {height:40px; line-height:40px; vertical-align:middle;} +.subjectRow {width:585px; height:30px; color:#7a7a7a; font-size:12px;} +.subjectRow li {height:30px; line-height:30px; vertical-align:middle;} .subjectSearch {border:1px solid #dddddd; height:32px; width:250px;outline: none;} .subjectInfo {width:385px; background-color:#f1f1f1; border:1px solid #dddddd; height:32px; line-height:32px; vertical-align:middle; text-align:center; color:#7a7a7a;} -.subjectWrap {border:1px solid #dddddd; border-top:none; padding:10px; width:365px; height:460px; overflow-y:auto;} +.subjectWrap {border:1px solid #dddddd; border-top:none; padding:10px; width:365px; height:470px; overflow-y:auto;} .subjectIntro {color:#585858; line-height:18px; font-size:12px;} .subjectContent {color:#888888; line-height:18px; font-size:12px;} .popupClose {background:url(../images/resource_icon_list.png) 0px -40px no-repeat; width:20px; height:20px; display:inline-block; position: absolute; z-index: 1000; right:10px; top:5px;}