Update personal_conferences_helper.rb

add get_member_show method
This commit is contained in:
chiu 2019-11-13 13:30:39 +08:00
parent fb5c9f6379
commit 8a39e73dfd
1 changed files with 4 additions and 1 deletions

View File

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