remove trailing space
This commit is contained in:
parent
7c36fc514d
commit
db8b0311a6
|
@ -70,8 +70,8 @@ module Admin::JournalPapersHelper
|
|||
value = {"en" => val}
|
||||
when 3
|
||||
begin
|
||||
value["zh_tw"] = val
|
||||
rescue
|
||||
value["zh_tw"] = val
|
||||
rescue
|
||||
value = {"zh_tw" => val}
|
||||
end
|
||||
jp.paper_title_translations = value
|
||||
|
@ -80,7 +80,7 @@ module Admin::JournalPapersHelper
|
|||
when 5
|
||||
begin
|
||||
value["zh_tw"] = val
|
||||
rescue
|
||||
rescue
|
||||
value = {"zh_tw" => val}
|
||||
end
|
||||
jp.journal_title_translations = value
|
||||
|
@ -89,7 +89,7 @@ module Admin::JournalPapersHelper
|
|||
when 7
|
||||
begin
|
||||
value["zh_tw"] = val
|
||||
rescue
|
||||
rescue
|
||||
value = {"zh_tw" => val}
|
||||
end
|
||||
jp.authors_translations = value
|
||||
|
@ -99,7 +99,7 @@ module Admin::JournalPapersHelper
|
|||
jp.language = val
|
||||
when 10
|
||||
jp.vol_no = val
|
||||
when 11
|
||||
when 11
|
||||
jp.issue_no = val
|
||||
when 12
|
||||
jp.form_to_start = val
|
||||
|
@ -111,7 +111,7 @@ module Admin::JournalPapersHelper
|
|||
when 15
|
||||
jls = JournalLevel.asc(:created_at).all.to_a
|
||||
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
|
||||
end
|
||||
when 16
|
||||
|
@ -131,7 +131,7 @@ module Admin::JournalPapersHelper
|
|||
jp.publication_date = val
|
||||
when 21
|
||||
jp.url = val
|
||||
when 22
|
||||
when 22
|
||||
jp.keywords = val
|
||||
when 23
|
||||
jp.abstract = val
|
||||
|
@ -153,7 +153,7 @@ module Admin::JournalPapersHelper
|
|||
d["name"] = role.title
|
||||
mps = role.member_profile_ids
|
||||
d1 = DateTime.new(year_start,1,1,0,0)
|
||||
d2 = DateTime.new(year_end,12,31,23,59)
|
||||
d2 = DateTime.new(year_end,12,31,23,59)
|
||||
d["data"] = JournalPaper.where(:publication_date.gte => d1, :publication_date.lte => d2, :member_profile_id.in => mps) rescue []
|
||||
data << d
|
||||
end
|
||||
|
@ -182,7 +182,7 @@ module Admin::JournalPapersHelper
|
|||
data["data"] = {}
|
||||
(year_start..year_end).each do |year|
|
||||
d1 = DateTime.new(year,1,1,0,0)
|
||||
d2 = DateTime.new(year,12,31,23,59)
|
||||
d2 = DateTime.new(year,12,31,23,59)
|
||||
t = jl.journal_papers.where(:publication_date.gte => d1, :publication_date.lte => d2, :member_profile_id.in => mps).count rescue 0
|
||||
data["data"][year.to_s] = t
|
||||
end
|
||||
|
@ -200,7 +200,7 @@ module Admin::JournalPapersHelper
|
|||
when "author_type"
|
||||
t = JournalPaper.where(:publication_date.gte => d1, :publication_date.lte => d2, :member_profile_id.in => mps, :journal_paper_author_type_ids => nil).count rescue 0
|
||||
end
|
||||
|
||||
|
||||
data["data"][year.to_s] = t
|
||||
end
|
||||
finaldata << data
|
||||
|
|
Loading…
Reference in New Issue