2020-02-05 13:44:49 +00:00
|
|
|
<link rel="stylesheet" media="screen" type="text/css" href="/assets/admin/olympiamanagement.scss">
|
|
|
|
<link rel="stylesheet" media="print" type="text/css" href="/assets/admin/olympiamanagement.scss">
|
|
|
|
<script src="/assets/admin/olympiamanagement.js"></script>
|
2020-02-06 06:28:16 +00:00
|
|
|
<% th_name_list = ['sign_up_start_time','sign_up_end_time','school_number','enrollment','status','action']%>
|
2020-02-05 13:44:49 +00:00
|
|
|
<% time = ['year','month','day'] %>
|
|
|
|
<h3><%=t('olympiamanagement.history_contest')%></h3>
|
|
|
|
<table class="ts_rowsonly" width="100%">
|
|
|
|
<thead><tr>
|
|
|
|
<% th_name_list.each do |th_name| %>
|
|
|
|
<th><%=t('olympiamanagement.'+th_name) %></th>
|
|
|
|
<% end %>
|
|
|
|
</tr></thead>
|
|
|
|
<tbody>
|
|
|
|
<% @sign_up_settings.each do |sign_up_setting| %>
|
|
|
|
<tr>
|
|
|
|
<td><%= time.map{|td| sign_up_setting["start_#{td}"]}.join('-') %></td>
|
|
|
|
<td><%= time.map{|td| sign_up_setting["end_#{td}"]}.join('-') %></td>
|
2020-02-06 06:28:16 +00:00
|
|
|
<td><%= @school_number = OlympiaSchoolDataFields.where(:sign_up_setting_id=>sign_up_setting.id).length %></td>
|
2020-02-05 13:44:49 +00:00
|
|
|
<td><%= @student_number = OlympiaStudentDataField.where(:sign_up_setting_id=>sign_up_setting.id).length %></td>
|
|
|
|
<td>
|
|
|
|
<% if sign_up_setting.active%>
|
|
|
|
<span>
|
|
|
|
<img alt="<%=t('olympiamanagement.active')%>" src="/assets/ok.gif">
|
|
|
|
<%=t('olympiamanagement.active')%></img>
|
|
|
|
</span>
|
|
|
|
<% else %>
|
|
|
|
<span>
|
|
|
|
<img alt="<%=t('olympiamanagement.inactive')%>" src="/assets/close.gif">
|
|
|
|
<%=t('olympiamanagement.inactive')%></img>
|
|
|
|
</span>
|
|
|
|
<% end %>
|
|
|
|
</td>
|
|
|
|
<td>
|
2020-02-20 09:49:29 +00:00
|
|
|
<a class="btn" href='<%= admin_olympiamanagements_update_sign_up_data_path + "?type=active_all_school&id=#{sign_up_setting.id}"%>'><%=t('olympiamanagement.active_all_school')%></a>
|
|
|
|
<a class="btn" href='<%= admin_olympiamanagements_update_sign_up_data_path + "?type=disable_all_school&id=#{sign_up_setting.id}"%>'><%=t('olympiamanagement.disable_all_school')%></a>
|
2020-02-05 13:44:49 +00:00
|
|
|
<% if !sign_up_setting.active%>
|
2020-02-06 06:28:16 +00:00
|
|
|
<a class="btn" href='<%= admin_olympiamanagements_update_sign_up_data_path + "?type=active&id=#{sign_up_setting.id}"%>'><%=t('olympiamanagement.active')%></a>
|
2020-02-05 13:44:49 +00:00
|
|
|
<% end %>
|
2020-02-06 06:28:16 +00:00
|
|
|
<a class="btn" href='<%= admin_olympiamanagements_update_sign_up_data_path + "?type=view&id=#{sign_up_setting.id}"%>'><%=t('olympiamanagement.view')%></a>
|
|
|
|
<a class="btn" href="#" onclick="if( window.confirm('<%=t('olympiamanagement.please_confirm_delete')%>') ) { window.location='<%=admin_olympiamanagements_update_sign_up_data_path + "?type=delete_sign_up_setting&id=#{sign_up_setting.id}"%>'; }" onkeypress="if( window.confirm('<%=t('olympiamanagement.please_confirm_delete')%>') ) { window.location='<%=admin_olympiamanagements_update_sign_up_data_path + "?type=delete_sign_up_setting&id=#{sign_up_setting.id}"%>'; }"><%=t('olympiamanagement.delete')%></a>
|
2020-02-05 13:44:49 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<%=create_pagination(params[:page].to_i,SignUpSetting.all).html_safe%>
|