2020-01-29 11:26:44 +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>
|
|
|
|
<fieldset class="fieldset_block search_block">
|
|
|
|
<legend class="fieldset_title"><%=t('olympiamanagement.search')%></legend>
|
|
|
|
<form>
|
|
|
|
<div class="col_text">
|
|
|
|
<li class="col" for="school_name"><%= t('olympiamanagement.school_name')%></li>
|
|
|
|
<li class="col_r"><input name="school_name" type="text" id="school_name" class="col_input" value="<%=params[:school_name].to_s%>"></li>
|
|
|
|
</div>
|
|
|
|
<div class="col_text">
|
|
|
|
<li class="col" for="school_code"><%= t('olympiamanagement.school_code') %></li><li class="col_r"><input name="school_code" type="text" id="school_code" class="col_input" value="<%=params[:school_code].to_s%>"></li>
|
|
|
|
</div>
|
|
|
|
<div style="clear:both;"></div>
|
|
|
|
<input type="submit" name="Submit" value="<%=t('olympiamanagement.submit')%>">
|
|
|
|
</form>
|
|
|
|
</fieldset>
|
|
|
|
<% th_name_list = ['school_name','school_code','class_number','enrollment','account_number','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>
|
|
|
|
<% @OlympiaSchoolDataFields.each do |field| %>
|
|
|
|
<tr>
|
|
|
|
<% th_name_list.each do |th_name|%>
|
2020-02-05 13:44:49 +00:00
|
|
|
<% if th_name != 'action'%>
|
2020-01-29 11:26:44 +00:00
|
|
|
<td><%= field[th_name]%></td>
|
|
|
|
<% else %>
|
|
|
|
<td>
|
|
|
|
<a href="<%=admin_olympiamanagements_add_school_data_path+"?id=#{field.id}"%>"><img src="/assets/edit.gif" alt="<%= t('olympiamanagement.edit') %>" align="top" width="24"><%= t('olympiamanagement.edit') %></a>
|
2020-02-04 16:37:03 +00:00
|
|
|
<a href="<%=admin_olympiamanagements_sign_up_student_data_list_path+"?olympia_school_id=#{field.id}"%>"><img src="/assets/view.gif" alt="<%= t('olympiamanagement.sign_up_student_data') %>" align="top" width="24"><%= t('olympiamanagement.sign_up_student_data') %></a>
|
2020-02-05 13:44:49 +00:00
|
|
|
<a href="#" onclick="if( window.confirm('<%=t('olympiamanagement.please_confirm_delete')%>') ) { window.location='<%=admin_olympiamanagements_update_school_data_path+"?id=#{field.id}&type=delete_school_data"%>'; }" onkeypress="if( window.confirm('<%=t('olympiamanagement.please_confirm_delete')%>') ) { window.location='<%=admin_olympiamanagements_update_school_data_path+"?id=#{field.id}&type=delete_school_data"%>'; }"><img src="/assets/trash.gif" alt="<%= t('olympiamanagement.delete') %>" align="top" width="24"><%= t('olympiamanagement.delete') %></a>
|
2020-01-31 10:52:53 +00:00
|
|
|
<%if field.approved%>
|
|
|
|
<a href="<%=admin_olympiamanagements_update_school_data_path+"?id=#{field.id}&type=unapproved"%>"><img src="/assets/close.gif" alt="<%= t('olympiamanagement.unapproved') %>" align="top" width="24"><%= t('olympiamanagement.unapproved') %></a>
|
|
|
|
<% else %>
|
|
|
|
<a href="<%=admin_olympiamanagements_update_school_data_path+"?id=#{field.id}&type=approved"%>"><img src="/assets/ok.gif" alt="<%= t('olympiamanagement.approved') %>" align="top" width="24"><%= t('olympiamanagement.approved') %></a>
|
|
|
|
<% end %>
|
2020-01-29 11:26:44 +00:00
|
|
|
</td>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
<%end%>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2020-01-31 10:52:53 +00:00
|
|
|
<% @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,@OlympiaSchoolDataFields,@extra_params).html_safe%>
|