added period
This commit is contained in:
parent
fc95e27412
commit
4106d684f4
|
@ -39,6 +39,8 @@ class PersonalConferencesController < ApplicationController
|
||||||
t << {"value" => (writing_conference.send(fs).strftime("%Y/%m/%d") rescue "")}
|
t << {"value" => (writing_conference.send(fs).strftime("%Y/%m/%d") rescue "")}
|
||||||
when "author_type"
|
when "author_type"
|
||||||
t << {"value" => (writing_conference.conference_author_types.collect{|cat| cat.title}.join(", ") rescue "")}
|
t << {"value" => (writing_conference.conference_author_types.collect{|cat| cat.title}.join(", ") rescue "")}
|
||||||
|
when "period"
|
||||||
|
t << {"value" => writing_conference.duration}
|
||||||
else
|
else
|
||||||
t << {"value" => writing_conference.send(fs)}
|
t << {"value" => writing_conference.send(fs)}
|
||||||
end
|
end
|
||||||
|
@ -76,6 +78,7 @@ class PersonalConferencesController < ApplicationController
|
||||||
"location",
|
"location",
|
||||||
"period_start_date",
|
"period_start_date",
|
||||||
"period_end_date",
|
"period_end_date",
|
||||||
|
"period",
|
||||||
"paper_type",
|
"paper_type",
|
||||||
"paper_level",
|
"paper_level",
|
||||||
"sponsor",
|
"sponsor",
|
||||||
|
@ -103,6 +106,7 @@ class PersonalConferencesController < ApplicationController
|
||||||
"location",
|
"location",
|
||||||
"period_start_date",
|
"period_start_date",
|
||||||
"period_end_date",
|
"period_end_date",
|
||||||
|
"period",
|
||||||
"paper_type",
|
"paper_type",
|
||||||
"paper_level",
|
"paper_level",
|
||||||
"sponsor",
|
"sponsor",
|
||||||
|
|
|
@ -64,6 +64,14 @@ class WritingConference
|
||||||
|
|
||||||
title.join(', ')
|
title.join(', ')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def duration
|
||||||
|
if !self.send('period_start_date').nil? or !self.send('period_end_date').nil?
|
||||||
|
date = (self.send('period_start_date').strftime('%Y.%m.%d') rescue "")+' ~ '+(self.send('period_end_date').strftime('%Y.%m.%d') rescue I18n.t('personal_project.up_to_today'))
|
||||||
|
else
|
||||||
|
date = ""
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
def self.get_plugin_datas_to_member(datas)
|
def self.get_plugin_datas_to_member(datas)
|
||||||
|
@ -121,6 +129,8 @@ class WritingConference
|
||||||
pd_data << {"data_title" => ( !p.conference_paper_levels.blank? ? p.conference_paper_levels.collect{|x| x.title}.join(', ') : "")}
|
pd_data << {"data_title" => ( !p.conference_paper_levels.blank? ? p.conference_paper_levels.collect{|x| x.title}.join(', ') : "")}
|
||||||
when "author_type"
|
when "author_type"
|
||||||
pd_data << {"data_title" => (p.conference_author_types.collect{|cat| cat.title}.join(", ") rescue "")}
|
pd_data << {"data_title" => (p.conference_author_types.collect{|cat| cat.title}.join(", ") rescue "")}
|
||||||
|
when "period"
|
||||||
|
pd_data << {"data_title" => p.duration}
|
||||||
else
|
else
|
||||||
pd_data << { "data_title" => p.send(t) }
|
pd_data << { "data_title" => p.send(t) }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue