diff --git a/app/models/writing_conference.rb b/app/models/writing_conference.rb index 8d83c0e..6eeffde 100644 --- a/app/models/writing_conference.rb +++ b/app/models/writing_conference.rb @@ -60,11 +60,42 @@ class WritingConference # pd = self.publication_date.strftime("%Y-%m-%d").split('-') # title << pd[0] # end - title << self.year + # title << self.year title.join(', ') end + def self.get_plugin_datas_to_member(datas) + fields_to_show = [ + "year", + "paper_title" + ] + + pd_title = fields_to_show.collect do |t| + { + "plugin_data_title" => I18n.t("personal_conference.#{t}") + } + end + + plugin_datas = datas.sort_for_frontend.collect do |p| + + pd_data = [] + fields_to_show.collect do |t| + if t == "paper_title" + pd_data << { "data_title" => "#{p.create_link}" } + else + pd_data << { "data_title" => p.send(t) } + end + end + + { + "pd_datas" => pd_data + } + + end + return [pd_title,plugin_datas] + end + def get_plugin_data(fields_to_show) plugin_datas = [] fields_to_show.each do |field|