导入作业添加作业类型
This commit is contained in:
parent
ec41cd4318
commit
8cc87c007f
|
@ -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
|
||||
|
|
|
@ -3,9 +3,19 @@
|
|||
<li class="subjectName fl hidden">
|
||||
<label onclick="show_homework_detail('<%=show_homework_detail_user_path(@user,:homework=>homework.id) %>')">
|
||||
<input type="radio" name="checkMenu" class="mr5" style="vertical-align:middle;" value="<%= homework.id%>"/>
|
||||
<span><%= homework.name%></span>
|
||||
<span title="<%= homework.name%>"><%= homework.name%></span>
|
||||
</label>
|
||||
</li>
|
||||
<li class="subjectType fl">
|
||||
<% case homework.homework_type %>
|
||||
<% when 1 %>
|
||||
普通
|
||||
<% when 2 %>
|
||||
编程
|
||||
<% when 3 %>
|
||||
分组
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="subjectPublisher fl"><%= homework.user.show_name %></li>
|
||||
<li class="fl subjectDate"><%=format_date homework.publish_time %></li>
|
||||
</ul>
|
||||
|
|
|
@ -10,13 +10,14 @@
|
|||
<div>
|
||||
<ul class="subjectBanner mt10">
|
||||
<li class="subjectName fl hidden"><span style="padding-left:15px;">作业名称</span></li>
|
||||
<li class="subjectType fl">作业类型</li>
|
||||
<li class="subjectPublisher fl">贡献者</li>
|
||||
<li class="fl subjectDate">发布时间</li>
|
||||
</ul>
|
||||
</div>
|
||||
<%= form_tag(user_select_homework_users_path, :multipart => true,:remote => true,:name=>"select_homework_form",:id=>'select_homework_form') do %>
|
||||
<input type="hidden" name="select_course" value="<%= @select_course%>">
|
||||
<div style="height:400px; min-height:400px; max-height:400px;" id="homework_list_form_show">
|
||||
<div style="height:450px; min-height:450px; max-height:450px;" id="homework_list_form_show">
|
||||
<%= render :partial => 'users/show_user_homework_form', :locals => {:homeworks => @homeworks}%>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -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;}
|
||||
|
|
|
@ -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;}
|
||||
|
|
Loading…
Reference in New Issue