2020-02-06 06:28:16 +00:00
|
|
|
<link rel="stylesheet" media="screen" type="text/css" href="/assets/olympiamanagement.scss">
|
|
|
|
<link rel="stylesheet" media="print" type="text/css" href="/assets/olympiamanagement.scss">
|
2020-02-03 16:17:54 +00:00
|
|
|
<script src="/assets/admin/olympiamanagement.js"></script>
|
|
|
|
<% th_name_list = ['StudentIdentity','StudentName','StudentClass','StudentArea','StudentPhone','action']%>
|
|
|
|
<table cellspacing="0" class="ts_rowsonly" width="100%" id="RSS_Table_page_contest_admin_1">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<% th_name_list.each do |th_name|%>
|
|
|
|
<th><%= t('olympiamanagement.'+th_name) %></th>
|
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<% @student_fields.each do |field| %>
|
|
|
|
<tr>
|
|
|
|
<% th_name_list.each do |th_name|%>
|
|
|
|
<%if th_name != 'action'%>
|
|
|
|
<% @value = field[th_name] %>
|
|
|
|
<% @index = @field_infos.map{|hash| hash.keys[0]}.index(th_name) rescue nil%>
|
|
|
|
<% if !@index.nil? %>
|
|
|
|
<% (['String','Year','select_num','File'].include?(@field_infos.map{|hash| hash.values[0]}[@index]['type'])) ? (nil) : (@value=(@field_infos.map{|hash| hash.values[0]}[@index]['values'][I18n.locale.to_s][@value.to_i].to_s rescue @value))%>
|
|
|
|
<% end %>
|
|
|
|
<td><%= @value %></td>
|
|
|
|
<% else %>
|
|
|
|
<td>
|
|
|
|
<a href="<%=add_sign_up_student_data_olympiamanagements_path+"?id=#{field.id}"%>"><img src="/assets/edit.gif" alt="<%= t('olympiamanagement.edit') %>" align="top" width="24"><%= t('olympiamanagement.edit') %></a>
|
2020-02-05 01:49:35 +00:00
|
|
|
<a href="<%=update_student_data_olympiamanagements_path+"?id=#{field.id}&type=delete_student_data"%>"><img src="/assets/trash.gif" alt="<%= t('olympiamanagement.delete') %>" align="top" width="24"><%= t('olympiamanagement.delete') %></a>
|
2020-02-03 16:17:54 +00:00
|
|
|
</td>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
<%end%>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<% @extra_params = request.query_parameters.map{|key,value| key+'='+value}.join('&') %>
|
2020-03-11 09:54:43 +00:00
|
|
|
<%=create_pagination_olympia(params[:page].to_i,@student_fields,@extra_params).html_safe%>
|