You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/views/admins/shixuns/shared/_list.html.erb

51 lines
2.3 KiB

<table class="table table-hover text-center shixuns-list-table">
<thead class="thead-light">
<th width="4%">序号</th>
<th width="8%">ID</th>
<th width="28%" class="text-left">实训名称</th>
<th width="8%">技术平台</th>
<th width="5%">Fork源</th>
<th width="5%">实践</th>
<th width="5%">选择</th>
<th width="6%">状态</th>
<th width="7%">创建者</th>
<th class="eud-pointer" width="13%"><%= sort_tag('创建于', name: 'created_at', path: admins_shixuns_path) %></th>
<th width="5%">单测</th>
<th width="6%">操作</th>
</thead>
<tbody>
<% shixuns.each_with_index do |shixun,index| %>
<tr>
<td><%= (@params_page.to_i - 1) * 20 + index + 1%></td>
<td><%= shixun.identifier %></td>
<td class="text-left"><span><%= link_to overflow_hidden_span(shixun.name), shixun_path(shixun), :target => "_blank", :title => shixun.name %></span></td>
<td>
<%= shixun.shixun_main_name.nil? ? "--" : shixun.shixun_main_name %>
</td>
<td>
<% if shixun.try(:fork_from).nil? %>
--
<% else%>
<%= link_to shixun.try(:identifier), shixun_path(shixun.try(:identifier)), target: '_blank'%>
<% end%>
</td>
<td><%= shixun.challenges.where(:st => 0).size %></td>
<td><%= shixun.challenges.where(:st => 1).size %></td>
<td class="shixuns-status-<%= shixun.status %>"><%= shixun_authentication_status shixun %></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="homepage_teacher">
<input type="checkbox" name="sigle_show" value="<%= shixun.id %>" <%= shixun.sigle_training ? "checked" : "" %> class="ml-3 mr5 magic-checkbox" id="join_teacher_homepage_<%= shixun.id %>">
<label style="top:-14px;" class="ml20" for="join_teacher_homepage_<%= shixun.id %>"></label>
</td>
<td class="operate">
<% if shixun.status == 0 %>
<%= link_to(l(:button_delete), admins_shixun_path(shixun), :method => :delete, :data => { confirm: "您确定要删除吗?" } ) %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= render partial: 'admins/shared/paginate', locals: { objects: shixuns } %>