Fix links in member module

This commit is contained in:
saurabhbhatia 2013-10-09 05:22:04 +00:00
parent 08a8d668ec
commit 7ef2dacf00
3 changed files with 20 additions and 19 deletions

View File

@ -83,13 +83,14 @@ class WritingBook
end
def create_link
title = ["\"#{self.extracted_chapters}\""]
title << self.book_title
title << self.publisher
title << self.pages
# title << "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})"
title.join(', ')
title = []
# title = ["#{self.extracted_chapters}"] if self.extracted_chapters.present?
title << self.paper_title if self.paper_title.present?
title << self.book_title if self.book_title.present?
title << self.publisher if self.publisher.present?
title << self.pages if self.pages.present?
# title << "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})"
title.join(', ')
end
protected

View File

@ -84,15 +84,13 @@ class WritingConference
end
def create_link
title = ["\"#{self.paper_title}\""]
title << self.conference_title
title << self.sponsor
title << self.location
title << "#{period_start_date}-#{period_end_date}"
title = ["#{self.paper_title}"]
title << self.conference_title if self.conference_title.present?
title << self.sponsor if self.sponsor.present?
title << self.location if self.location.present?
title << "#{period_start_date}-#{period_end_date}" if (self.period_start_date.present? && self.period_end_date.present?)
# title << "(#{self.conference_paper_types.collect{|x| x.title}.join(', ')})"
title.join(', ')
title.join(', ')
end
protected

View File

@ -90,11 +90,13 @@ class WritingJournal
end
def create_link
title = ["\"#{self.paper_title}\""]
title << self.journal_title
title.join(', ')
title = ["#{self.paper_title}"]
title << self.journal_title if self.journal_title.present?
title << ( !self.journal_level_types.blank? ? "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})" : nil)
title.join(', ')
title << "Volume No: "+self.vol_no if (self.vol_no.present? && self.vol_no != "0")
title << "From Page: "+self.form_to_start if (self.form_to_start.present? && self.form_to_start != "0")
title << "To Page: "+self.form_to_end if (self.form_to_end.present? && self.form_to_end != "0")
title.join(', ')
end
def new_writing_journal_files=(var)