Update journal_papers_helper.rb

This commit is contained in:
chiu 2019-11-02 14:15:41 +08:00
parent 39cda6b5d6
commit b842ba062b
1 changed files with 2 additions and 1 deletions

View File

@ -3,7 +3,8 @@ module Admin::JournalPapersHelper
(journal.authors.to_s.blank? ? get_member(journal).collect(&:name).join('/') : Nokogiri::HTML(journal.authors.to_s).text rescue "") (journal.authors.to_s.blank? ? get_member(journal).collect(&:name).join('/') : Nokogiri::HTML(journal.authors.to_s).text rescue "")
end end
def get_authors_show(journal) def get_authors_show(journal)
(journal.authors.to_s.blank? ? get_member(journal).collect{|member| "<a href='#{OrbitHelper.url_to_plugin_show(member.to_param('member')}' title='#{member.name}'>#{member.name}</a>"}.join('/') : (journal.authors.to_s) rescue "") member_ = 'member'
(journal.authors.to_s.blank? ? get_member(journal).collect{|member| "<a href='#{OrbitHelper.url_to_plugin_show(member.to_param,'member'}' title='#{member.name}'>#{member.name}</a>"}.join('/') : (journal.authors.to_s) rescue "")
end end
def get_member(journal) def get_member(journal)
Array(MemberProfile.find(Array(journal).collect(&:member_profile_id))) Array(MemberProfile.find(Array(journal).collect(&:member_profile_id)))