diff --git a/app/controllers/admin/writing_conferences_controller.rb b/app/controllers/admin/writing_conferences_controller.rb index 7c66ae9..2ee51f0 100644 --- a/app/controllers/admin/writing_conferences_controller.rb +++ b/app/controllers/admin/writing_conferences_controller.rb @@ -24,8 +24,8 @@ class Admin::WritingConferencesController < OrbitMemberController end def edit - @member = MemberProfile.find_by(:uid=>params['uid']) rescue nil @writing_conference = WritingConference.find(params[:id]) + @member = @writing_conference.member_profile end def update diff --git a/app/controllers/personal_conferences_controller.rb b/app/controllers/personal_conferences_controller.rb index d434385..56f7af4 100644 --- a/app/controllers/personal_conferences_controller.rb +++ b/app/controllers/personal_conferences_controller.rb @@ -30,7 +30,9 @@ class PersonalConferencesController < ApplicationController "conference_title", "paper_level", "paper_type", + "author_name", "authors", + "number_of_authors", "author_type", "year", "language", diff --git a/app/models/writing_conference.rb b/app/models/writing_conference.rb index 2ba0a1d..8884881 100644 --- a/app/models/writing_conference.rb +++ b/app/models/writing_conference.rb @@ -25,6 +25,7 @@ class WritingConference field :update_user_id, :type => BSON::ObjectId field :isbn field :isi_number + field :number_of_authors field :rss2_id belongs_to :member_profile @@ -73,6 +74,14 @@ class WritingConference value = self.conference_author_types.collect{|type| type.title}.join(',') rescue "" when "paper_type" value = self.conference_paper_types.collect{|type| type.title}.join(',') rescue "" + when "author_name" + value = [] + ([I18n.locale]+(Site.first.in_use_locales-[I18n.locale])).each do |locale| + if self.member_profile.first_name_translations[locale] || self.member_profile.last_name_translations[locale] + value << "#{self.member_profile.first_name_translations[locale]} #{self.member_profile.last_name_translations[locale]}" + end + end + value = value.join(" / ") when "publication_date" value = self.publication_date.to_date.strftime("%Y-%m-%d") rescue "" when "language" diff --git a/app/views/admin/writing_conferences/_form.html.erb b/app/views/admin/writing_conferences/_form.html.erb index 23be3c4..3e58320 100644 --- a/app/views/admin/writing_conferences/_form.html.erb +++ b/app/views/admin/writing_conferences/_form.html.erb @@ -91,11 +91,19 @@ + +