实训列表页
This commit is contained in:
parent
e9f2cab081
commit
fbfa68f843
|
@ -1,7 +1,7 @@
|
|||
<table class="edu-pop-table color-grey3 edu-txt-center table-pa5 interval-td" style="border:none;" cellspacing="0" cellpadding="0" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<th width="10%">
|
||||
<span class="selectjoin fl open-select ml15" id="allselect">
|
||||
<% unless is_teacher %>
|
||||
序号
|
||||
|
@ -11,14 +11,14 @@
|
|||
<% end %>
|
||||
</span>
|
||||
</th>
|
||||
<th>用户ID</th>
|
||||
<th>姓名</th>
|
||||
<th>学号</th>
|
||||
<th>分班</th>
|
||||
<th>作业成绩</th>
|
||||
<th>发布资源</th>
|
||||
<th>发布帖子</th>
|
||||
<th>回复评论</th>
|
||||
<th width="14%">用户ID</th>
|
||||
<th width="10%">姓名</th>
|
||||
<th width="12%">学号</th>
|
||||
<th width="10%">分班</th>
|
||||
<th width="13%" style="white-space:nowrap; overflow:hidden; text-overflow:ellipsis">作业成绩</th>
|
||||
<th width="10%">发布资源</th>
|
||||
<th width="10%">发布帖子</th>
|
||||
<th width="10%">回复评论</th>
|
||||
<!--<th>操作</th>-->
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
<table class="edu-pop-table edu-txt-center" cellspacing="0" cellpadding="0" style="table-layout: fixed;">
|
||||
<thead>
|
||||
<th width="10%">ID</th>
|
||||
<th width="20%" class="edu-txt-left">实训名称</th>
|
||||
<th width="16%" class="edu-txt-left">实训名称</th>
|
||||
<th width="15%">技术平台</th>
|
||||
<th width="7%">Fork源</th>
|
||||
<th width="7%">实践任务</th>
|
||||
<th width="7%">选择任务</th>
|
||||
<th width="6%">状态</th>
|
||||
<th width="10%">创建者</th>
|
||||
<th width="7%">创建者</th>
|
||||
<th class="eud-pointer" width="11%">创建时间<i class="fa <%= @sx_order == "desc" ? "fa-long-arrow-down" : "fa-long-arrow-up" %> color-light-green ml5" title="功能完善中,敬请期待"></i></th>
|
||||
<th width="14%">操作</th>
|
||||
</thead>
|
||||
|
@ -16,10 +17,17 @@
|
|||
<td><%= shixun.identifier %></td>
|
||||
<td class="edu-txt-left"><span><%= link_to shixun.name, shixun_path(shixun), :target => "_blank", :title => shixun.name %></span></td>
|
||||
<td><%= shixun.language %></td>
|
||||
<td>
|
||||
<% unless shixun.try(:fork_from).nil? %>
|
||||
<%= link_to shixun.try(:fork_from),shixun_path(shixun), target: '_blank'%>
|
||||
<% else%>
|
||||
--
|
||||
<% end%>
|
||||
</td>
|
||||
<td><%= shixun.challenges.where(:st => 0).count %></td>
|
||||
<td><%= shixun.challenges.where(:st => 1).count %></td>
|
||||
<td><%= shixun_authentication_status shixun %></td>
|
||||
<td><%= shixun.owner.try(:show_real_name) %></td>
|
||||
<td><%= link_to shixun.owner.try(:show_real_name),user_path(shixun.user_id),target:'_blank' %></td>
|
||||
<td><%= format_time shixun.created_at %></td>
|
||||
<td class="operate">
|
||||
<!-- <a class="fl" href="<%#= shixun_path(shixun) %>" data-method="delete" >删除</a>-->
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
class AddSchoolIdCodeToSchools < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :schools, :shool_code, :string
|
||||
count = School.all.count / 30 + 2
|
||||
transaction do
|
||||
for i in 1 ... count do i
|
||||
School.page(i).per(30).each do |school|
|
||||
if school.city.nil? || school.province.nil? || school.address.nil?
|
||||
apply_add_school = ApplyAddSchools.where(:school_id => school.id).last
|
||||
if apply_add_school
|
||||
school.update_attributes(:city => apply_add_school.city, :province => apply_add_school.province, :address => apply_add_school.address)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,11 @@
|
|||
class AddNewColumnToDepartment < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :departments, :is_auth, :boolean, :default => 0
|
||||
|
||||
Department.where("0=0").each do |dep|
|
||||
if ApplyAddDepartment.where(:department_id => dep.id, :status => 1).count > 0
|
||||
dep.update_column("is_auth", 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue