Update journal_papers_helper.rb
This commit is contained in:
parent
5155427305
commit
1bba50e692
|
@ -1,9 +1,9 @@
|
|||
module Admin::JournalPapersHelper
|
||||
def get_authors_text(journal)
|
||||
journal.authors.to_s.blank? ? get_member(journal).collect(&:name).join('/') : Nokogiri::HTML(journal.authors.to_s).text
|
||||
(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(journal).collect(&:name).join('/') : (journal.authors.to_s)
|
||||
(journal.authors.to_s.blank? ? get_member(journal).collect{|member| "<a href='#{OrbitHelper.url_to_show(member.to_param)}' title='#{member.name}'>#{member.name}</a>"}.join('/') : (journal.authors.to_s) rescue "")
|
||||
end
|
||||
def get_member(journal)
|
||||
Array(MemberProfile.find(Array(journal).collect(&:member_profile_id)))
|
||||
|
|
Loading…
Reference in New Issue