olympiamanagement/app/views/admin/olympiamanagements/school_data_list.html.erb

51 lines
3.0 KiB
Plaintext
Raw Normal View History

<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|%>
<%if th_name != 'action'%>
<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-01-31 10:52:53 +00:00
<a href="<%=admin_olympiamanagements_add_school_data_path+"?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>
<a href="<%=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 %>
</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('&') %>
<%=create_pagination(params[:page].to_i,@OlympiaSchoolDataFields,@extra_params).html_safe%>