forked from saurabh/personal-journal
Merge branch 'master' into 'master'
add form_to_start & form_to_end for import method add form_to_start & form_to_end for import method See merge request !8
This commit is contained in:
commit
8da83ec1c0
|
@ -101,38 +101,42 @@ module Admin::JournalPapersHelper
|
||||||
jp.vol_no = val
|
jp.vol_no = val
|
||||||
when 11
|
when 11
|
||||||
jp.issue_no = val
|
jp.issue_no = val
|
||||||
when 12
|
when 12
|
||||||
|
jp.form_to_start = val
|
||||||
|
when 13
|
||||||
|
jp.form_to_end = val
|
||||||
|
when 14
|
||||||
jp.total_pages = val
|
jp.total_pages = val
|
||||||
when 13
|
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