|
|
|
@ -14,36 +14,40 @@
|
|
|
|
|
<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), "/shixuns/#{shixun.identifier}", :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),"/users/#{shixun.owner.try(:login)}",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>
|
|
|
|
|
<% if shixuns.present? %>
|
|
|
|
|
<% 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), "/shixuns/#{shixun.identifier}", :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),"/users/#{shixun.owner.try(:login)}",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 %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= render 'admins/shared/no_data_for_table' %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|