add form_to_start & form_to_end to import method
This commit is contained in:
parent
7ba8a128ff
commit
7c36fc514d
|
@ -102,37 +102,42 @@ module Admin::JournalPapersHelper
|
||||||
when 11
|
when 11
|
||||||
jp.issue_no = val
|
jp.issue_no = val
|
||||||
when 12
|
when 12
|
||||||
jp.total_pages = val
|
jp.form_to_start = val
|
||||||
when 13
|
when 13
|
||||||
|
jp.form_to_end = val
|
||||||
|
# index need to +2
|
||||||
|
when 14
|
||||||
|
jp.total_pages = val
|
||||||
|
when 15
|
||||||
jls = JournalLevel.asc(:created_at).all.to_a
|
jls = JournalLevel.asc(:created_at).all.to_a
|
||||||
ts = val.to_s.split(",")
|
ts = val.to_s.split(",")
|
||||||
ts.each do |t|
|
ts.each do |t|
|
||||||
jp.journal_level_ids << jls[t.to_i].id if t.to_s.is_i? && t.to_i < jls.count
|
jp.journal_level_ids << jls[t.to_i].id if t.to_s.is_i? && t.to_i < jls.count
|
||||||
end
|
end
|
||||||
when 14
|
when 16
|
||||||
jpts = JournalPaperType.asc(:created_at).all.to_a
|
jpts = JournalPaperType.asc(:created_at).all.to_a
|
||||||
jp.journal_paper_type = jpts[val.to_i] if val.to_s.is_i? && val.to_i < jpts.count
|
jp.journal_paper_type = jpts[val.to_i] if val.to_s.is_i? && val.to_i < jpts.count
|
||||||
when 15
|
when 17
|
||||||
jpas = JournalPaperAuthorType.asc(:created_at).all.to_a
|
jpas = JournalPaperAuthorType.asc(:created_at).all.to_a
|
||||||
ts = val.to_s.split(",")
|
ts = val.to_s.split(",")
|
||||||
ts.each do |t|
|
ts.each do |t|
|
||||||
jp.journal_paper_author_type_ids << jpas[t.to_i].id if t.to_s.is_i? && t.to_i < jpas.count
|
jp.journal_paper_author_type_ids << jpas[t.to_i].id if t.to_s.is_i? && t.to_i < jpas.count
|
||||||
end
|
end
|
||||||
when 16
|
|
||||||
jp.number_of_authors = val
|
|
||||||
when 17
|
|
||||||
jp.isbn = val
|
|
||||||
when 18
|
when 18
|
||||||
jp.publication_date = val
|
jp.number_of_authors = val
|
||||||
when 19
|
when 19
|
||||||
jp.url = val
|
jp.isbn = val
|
||||||
when 20
|
when 20
|
||||||
jp.keywords = val
|
jp.publication_date = val
|
||||||
when 21
|
when 21
|
||||||
jp.abstract = val
|
jp.url = val
|
||||||
when 22
|
when 22
|
||||||
jp.note = val
|
jp.keywords = val
|
||||||
when 23
|
when 23
|
||||||
|
jp.abstract = val
|
||||||
|
when 24
|
||||||
|
jp.note = val
|
||||||
|
when 25
|
||||||
jp.associated_project_translations = {"en" => val, "zh_tw" => val}
|
jp.associated_project_translations = {"en" => val, "zh_tw" => val}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue