forked from saurabh/personal-journal
fix author order and date
This commit is contained in:
parent
f4a907b771
commit
955562045e
|
@ -34,9 +34,9 @@ class PersonalJournalsController < ApplicationController
|
||||||
when "level_type"
|
when "level_type"
|
||||||
t << {"value" => ( !journal_paper.journal_levels.blank? ? "(#{journal_paper.journal_levels.collect{|x| x.title}.join(', ')})" : nil)}
|
t << {"value" => ( !journal_paper.journal_levels.blank? ? "(#{journal_paper.journal_levels.collect{|x| x.title}.join(', ')})" : nil)}
|
||||||
when "publication_date"
|
when "publication_date"
|
||||||
t << {"value" => (journal_paper.send(fs).strftime("%Y/%m/%d") rescue "")}
|
t << {"value" => (journal_paper.send(fs).strftime("%Y/%m") rescue "")}
|
||||||
when "author_type"
|
when "author_type"
|
||||||
t << {"value" => (journal_paper.journal_paper_author_types.collect{|jat| title}.join(", ") rescue "")}
|
t << {"value" => (journal_paper.journal_paper_author_types.collect{|jat| jat.title}.join(", ") rescue "")}
|
||||||
else
|
else
|
||||||
t << {"value" => journal_paper.send(fs)}
|
t << {"value" => journal_paper.send(fs)}
|
||||||
end
|
end
|
||||||
|
|
|
@ -121,9 +121,9 @@ class JournalPaper
|
||||||
when "level_type"
|
when "level_type"
|
||||||
pd_data << {"data_title" => ( !p.journal_levels.blank? ? "(#{p.journal_levels.collect{|x| x.title}.join(', ')})" : nil)}
|
pd_data << {"data_title" => ( !p.journal_levels.blank? ? "(#{p.journal_levels.collect{|x| x.title}.join(', ')})" : nil)}
|
||||||
when "publication_date"
|
when "publication_date"
|
||||||
pd_data << {"data_title" => (p.send(t).strftime("%Y/%m/%d") rescue "")}
|
pd_data << {"data_title" => (p.send(t).strftime("%Y/%m") rescue "")}
|
||||||
when "author_type"
|
when "author_type"
|
||||||
pd_data << {"data_title" => (p.journal_paper_author_types.collect{|jat| title}.join(", ") rescue "")}
|
pd_data << {"data_title" => (p.journal_paper_author_types.collect{|jat| jat.title}.join(", ") rescue "")}
|
||||||
else
|
else
|
||||||
pd_data << {"data_title" => p.send(t)}
|
pd_data << {"data_title" => p.send(t)}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue