olympiamanagement/app/views/olympiamanagements/print_registration_form.htm...

62 lines
2.0 KiB
Plaintext

<!DOCTYPE html>
<html>
<head>
<%=@head%>
</head>
<body>
<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>
<td <%=((i==@record_fields.count-1) ? "style=line-height:80px;" : "")%>><%=(@school_data[record_item.to_s].nil? ? '&nbsp;'.html_safe : @school_data[record_item.to_s]) %></td>
<% 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>
<% @student_data_list.each_with_index do |field,i| %>
<tr>
<% @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>
<% end %>
<% end %>
</tr>
<%end%>
</tbody></table>
<script type="text/javascript">
window.onload = function ()
{
text=document
print(text)
}
</script>
</div></div></div></div></div></div></div>
</body>
</html>>