diff --git a/app/helpers/admin/journal_papers_helper.rb b/app/helpers/admin/journal_papers_helper.rb index 50e45a6..cfe0bb6 100644 --- a/app/helpers/admin/journal_papers_helper.rb +++ b/app/helpers/admin/journal_papers_helper.rb @@ -3,13 +3,14 @@ module Admin::JournalPapersHelper (journal.authors.to_s.blank? ? get_member(journal).collect(&:name).join('/') : Nokogiri::HTML(journal.authors.to_s).text rescue "") end def get_authors_show(journal) - (journal.authors.to_s.blank? ? get_member_show(journal) : (journal.authors.to_s) rescue "") + member_names = get_member_show(journal) + (journal.authors.to_s.blank? ? get_member_show(journal) : (member_names.blank? ? journal.authors.to_s : (member_names + "、" + journal.authors.to_s.gsub(",","、").gsub(",","、")) ) rescue "") end def get_member(journal) Array(MemberProfile.find(Array(journal).collect(&:member_profile_id))) rescue [] end def get_member_show(journal) - get_member(journal).collect{|member| "#{member.name}"}.join('/') + get_member(journal).collect{|member| "#{member.name}"}.join('、') end def get_level_type(journal) !journal.journal_levels.blank? ? "(#{journal.journal_levels.collect(&:title).join(', ')})" : nil diff --git a/app/models/journal_paper.rb b/app/models/journal_paper.rb index 3630718..2905019 100644 --- a/app/models/journal_paper.rb +++ b/app/models/journal_paper.rb @@ -218,7 +218,7 @@ class JournalPaper when "url" value = self.url.to_s.blank? ? "" : "#{self.url}" when "authors" - value = get_member_show(self) rescue "" + value = get_authors_show(self) rescue "" else value = self.send(field) rescue "" end