This commit is contained in:
Harry Bomrah 2016-04-01 20:58:59 +08:00
parent a1a4a53ffd
commit f12cffbeb4
2 changed files with 5 additions and 1 deletions

View File

@ -35,8 +35,10 @@ class PersonalConferencesController < ApplicationController
t << {"value" => ( !writing_conference.conference_paper_levels.blank? ? "(#{writing_conference.conference_paper_levels.collect{|x| x.title}.join(', ')})" : nil)}
when "paper_types"
t << {"value" => ( !writing_conference.conference_paper_levels.blank? ? "(#{writing_conference.conference_paper_levels.collect{|x| x.title}.join(', ')})" : nil)}
when "publication_date"
when "publication_date"
t << {"value" => (writing_conference.send(fs).strftime("%Y/%m/%d") rescue "")}
when "author_type"
t << {"value" => (writing_conference.conference_author_type.title rescue "")}
else
t << {"value" => writing_conference.send(fs)}
end

View File

@ -117,6 +117,8 @@ class WritingConference
pd_data << {"data_title" => ( !p.conference_paper_types.blank? ? p.conference_paper_types.collect{|x| x.title}.join(', ') : "")}
when "paper_levels"
pd_data << {"data_title" => ( !p.conference_paper_levels.blank? ? p.conference_paper_levels.collect{|x| x.title}.join(', ') : "")}
when "author_type"
pd_data << {"data_title" => (p.conference_author_type.title rescue "")}
else
pd_data << { "data_title" => p.send(t) }
end