2020-02-04 11:51:05 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<%=@head%>
|
|
|
|
</head>
|
|
|
|
<body>
|
2020-02-04 11:24:13 +00:00
|
|
|
<div id="main1"><div id="main2"><div id="main">
|
|
|
|
<%=@breadcumb%>
|
|
|
|
<table class="print_contest1"><tbody>
|
|
|
|
<tr><th colspan="4"><font face="標楷體, cursive"><font size="6" style="font-size: 1.67em;"><%=@record_form_title%></font></font></th></tr>
|
|
|
|
<% @record_fields.each_with_index do |record_block,i| %>
|
|
|
|
<tr>
|
|
|
|
<% record_block.each do |record_item| %>
|
|
|
|
<td <%=((i==@record_fields.count-1) ? "style=line-height:80px;" : "")%>><%=t('olympiamanagement.'+record_item.to_s)%></td>
|
2020-02-04 11:51:05 +00:00
|
|
|
<td <%=((i==@record_fields.count-1) ? "style=line-height:80px;" : "")%>><%=(@school_data[record_item.to_s].nil? ? ' '.html_safe : @school_data[record_item.to_s]) %></td>
|
2020-02-04 11:24:13 +00:00
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</tbody></table>
|
|
|
|
|
|
|
|
<table class="print_contest2">
|
|
|
|
<tbody>
|
|
|
|
<tr><td><%=@remark_texts%><br></td></tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<table class="print_contest3"><tbody>
|
|
|
|
<tr>
|
|
|
|
<% @student_fields.each do |field_name| %>
|
|
|
|
<td><%=t('olympiamanagement.'+field_name.to_s)%></td>
|
|
|
|
<% end %>
|
|
|
|
</tr>
|
2020-02-04 11:51:05 +00:00
|
|
|
<% @student_data_list.each_with_index do |field,i| %>
|
2020-02-04 11:24:13 +00:00
|
|
|
<tr>
|
2020-02-04 11:51:05 +00:00
|
|
|
<% @student_fields.each do |th_name|%>
|
|
|
|
<% if th_name == 'serial_number' %>
|
|
|
|
<td><%= "#{i+1}" %></td>
|
|
|
|
<%elsif th_name != 'birth_date'%>
|
|
|
|
<% @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><%= "#{field.StudentBirthYear}-#{field.StudentBirthMonth}-#{field.StudentBirthDay}" %></td>
|
2020-02-04 11:24:13 +00:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
<%end%>
|
|
|
|
</tbody></table>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
window.onload = function ()
|
|
|
|
{
|
|
|
|
text=document
|
|
|
|
print(text)
|
|
|
|
}
|
|
|
|
</script>
|
2020-02-04 11:51:05 +00:00
|
|
|
</div></div></div></div></div></div></div>
|
|
|
|
</body>
|
|
|
|
</html>>
|