diff --git a/app/controllers/personal_journals_controller.rb b/app/controllers/personal_journals_controller.rb index 53c0e60..adddfe0 100644 --- a/app/controllers/personal_journals_controller.rb +++ b/app/controllers/personal_journals_controller.rb @@ -144,7 +144,7 @@ class PersonalJournalsController < ApplicationController def index_by_author(journal_papers) journal_papers_total_pages = journal_papers.total_pages - journal_papers_list = journal_papers.group_by{|jp| jp.member_profile.name rescue jp.authors}.collect do |name, jps| + journal_papers_list = journal_papers.group_by{|jp| jp.member_profiles.collect{|v| v.name}.join(', ') rescue jp.authors}.collect do |name, jps| jps_data = jps.collect do |jp| {'title' => jp.create_link_tag_for_title} end diff --git a/app/models/journal_paper.rb b/app/models/journal_paper.rb index 0059b22..e8cd8cb 100644 --- a/app/models/journal_paper.rb +++ b/app/models/journal_paper.rb @@ -211,6 +211,19 @@ class JournalPaper plugin_datas end + def member_profile(only_one=true) + tmp = super() + only_one ? tmp.first : tmp + end + + def member_profiles + member_profile(false) + end + + def member_profile=(mp) + super(mp.class != MemberProfile ? mp : [mp]) + end + def get_plugin_field_data(field) case field when "level_type"