Fix bug.
This commit is contained in:
parent
cdb18dafd8
commit
c9d670f796
|
@ -1,7 +1,8 @@
|
|||
# encoding: utf-8
|
||||
|
||||
wb = xlsx_package.workbook
|
||||
wb.add_worksheet(name: "school_class") do |sheet|
|
||||
wb.add_worksheet(name: "cancer_tool") do |sheet|
|
||||
if !@results[0].nil?
|
||||
row = []
|
||||
title = sheet.styles.add_style(:bg_color => "FFFF00",:border=>{ :style => :thin, :color => "666666" },:alignment=>{ :horizontal => :center,:vertical => :center ,:wrap_text => true})
|
||||
column = sheet.styles.add_style(:alignment=>{ :horizontal => :center,:vertical => :center ,:wrap_text => true},:border=>{ :style => :thin, :color => "666666" })
|
||||
|
@ -33,4 +34,5 @@ wb.add_worksheet(name: "school_class") do |sheet|
|
|||
export_data_rows.each do |infos_row|
|
||||
sheet.add_row infos_row , :style=> column
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,14 +1,13 @@
|
|||
<link href="/assets/admin/cancerpredict.css" media="print" rel="stylesheet">
|
||||
<link href="/assets/admin/cancerpredict.css" media="screen" rel="stylesheet">
|
||||
<% if !@results[0].nil? %>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<% if !@results[0].nil? %>
|
||||
<th><%=((I18n.locale=="en") ? 'submit time' : '提交時間') %></th>
|
||||
<% @results[0].names.each do |key,name|%>
|
||||
<th><%=name[I18n.locale.to_s].to_s.html_safe %></th>
|
||||
<%end%>
|
||||
<%end%>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -44,6 +43,7 @@
|
|||
<%end%>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
<%=@pagination.html_safe%>
|
||||
<style type="text/css">
|
||||
thead > tr > th{
|
||||
|
|
Loading…
Reference in New Issue