small fixes for excel import
This commit is contained in:
parent
6181a5a75d
commit
299875a130
|
@ -29,12 +29,20 @@ module Admin::PersonalHonorsHelper
|
||||||
when 2
|
when 2
|
||||||
value = {"en" => val}
|
value = {"en" => val}
|
||||||
when 3
|
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
|
honor.award_name_translations = value
|
||||||
when 4
|
when 4
|
||||||
value = {"en" => val}
|
value = {"en" => val}
|
||||||
when 5
|
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
|
honor.awarding_unit_translations = value
|
||||||
when 6
|
when 6
|
||||||
honor.year = val
|
honor.year = val
|
||||||
|
@ -48,8 +56,6 @@ module Admin::PersonalHonorsHelper
|
||||||
when 10
|
when 10
|
||||||
honor.keywords = val
|
honor.keywords = val
|
||||||
when 11
|
when 11
|
||||||
# honor.abstract = val
|
|
||||||
when 12
|
|
||||||
honor.note = val
|
honor.note = val
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -59,10 +59,6 @@ wb.add_worksheet(name: "Honor") do |sheet|
|
||||||
row1 << "textfield"
|
row1 << "textfield"
|
||||||
row2 << "Example: keyword1,keyword2"
|
row2 << "Example: keyword1,keyword2"
|
||||||
|
|
||||||
row << t("personal_honor.abstract")
|
|
||||||
row1 << "textarea"
|
|
||||||
row2 << ""
|
|
||||||
|
|
||||||
row << t("personal_honor.note")
|
row << t("personal_honor.note")
|
||||||
row1 << "textarea"
|
row1 << "textarea"
|
||||||
row2 << ""
|
row2 << ""
|
||||||
|
|
Loading…
Reference in New Issue