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.
49 lines
2.0 KiB
49 lines
2.0 KiB
<table class="table table-hover text-center myshixun-list-table">
|
|
<thead class="thead-light">
|
|
<tr>
|
|
<th width="6%">ID</th>
|
|
<th width="10%">标识</th>
|
|
<th width="22%" class="text-left">实训名称</th>
|
|
<th width="10%">实训老师</th>
|
|
<th width="6%">完成</th>
|
|
<th width="6%">经验值</th>
|
|
<th width="10%">学员姓名</th>
|
|
<th width="16%" class="text-left">学员单位</th>
|
|
<th width="14%"><%= sort_tag('开启时间', name: 'created_at', path: admins_myshixuns_path) %></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% if myshixuns.present? %>
|
|
<% myshixuns.each do |myshixun| %>
|
|
<tr class="myshixun-item-<%= myshixun.id %>">
|
|
<td><%= myshixun.id %></td>
|
|
<td>
|
|
<% current_task = myshixun.last_executable_task || myshixun.last_task %>
|
|
<%= link_to "/myshixuns/#{myshixun.identifier}/stages/#{current_task.identifier}", target: '_blank' do %>
|
|
<%= myshixun.identifier %>
|
|
<% end %>
|
|
</td>
|
|
<td class="text-left">
|
|
<%= link_to "/shixuns/#{myshixun.shixun.identifier}", target: '_blank' do %>
|
|
<%= overflow_hidden_span myshixun.shixun.name, width: 280 %>
|
|
<% end %>
|
|
</td>
|
|
<td><%= myshixun.shixun.user.real_name %></td>
|
|
<td><%= finish_game_count.fetch(myshixun.id, 0) %>/<%= myshixun.shixun.challenges_count %></td>
|
|
<td><%= total_score.fetch(myshixun.id, 0) %></td>
|
|
<td>
|
|
<%= link_to "/users/#{myshixun.user.login}", target: '_blank' do %>
|
|
<%= overflow_hidden_span myshixun.user.real_name, width: 80 %>
|
|
<% end %>
|
|
</td>
|
|
<td class="text-left"><%= overflow_hidden_span myshixun.user&.school_name, width: 150 %></td>
|
|
<td><%= myshixun.created_at&.strftime('%Y-%m-%d %H:%M') %></td>
|
|
</tr>
|
|
<% end %>
|
|
<% else %>
|
|
<%= render 'admins/shared/no_data_for_table' %>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<%= render partial: 'admins/shared/paginate', locals: { objects: myshixuns } %> |