small fixes for excel import

This commit is contained in:
Harry Bomrah 2015-12-14 16:12:52 +08:00
parent 6181a5a75d
commit 299875a130
2 changed files with 10 additions and 8 deletions

View File

@ -29,12 +29,20 @@ module Admin::PersonalHonorsHelper
when 2
value = {"en" => val}
when 3
value["zh_tw"] = val rescue value = {"zh_tw" => val}
begin
value["zh_tw"] = val
rescue
value = {"zh_tw" => val}
end
honor.award_name_translations = value
when 4
value = {"en" => val}
when 5
value["zh_tw"] = val rescue value = {"zh_tw" => val}
begin
value["zh_tw"] = val
rescue
value = {"zh_tw" => val}
end
honor.awarding_unit_translations = value
when 6
honor.year = val
@ -48,8 +56,6 @@ module Admin::PersonalHonorsHelper
when 10
honor.keywords = val
when 11
# honor.abstract = val
when 12
honor.note = val
end
end

View File

@ -59,10 +59,6 @@ wb.add_worksheet(name: "Honor") do |sheet|
row1 << "textfield"
row2 << "Example: keyword1,keyword2"
row << t("personal_honor.abstract")
row1 << "textarea"
row2 << ""
row << t("personal_honor.note")
row1 << "textarea"
row2 << ""