Updated Books,Conference, Journal to display properly in the frontend

This commit is contained in:
saurabhbhatia committed 2013-09-24 15:07:49 +08:00
1 parent b535f2cf9c
commit d5bb2a1889
5 files changed
+31 -16

No files matched your search

@@ -83,11 +83,12 @@ class WritingBook
end
def create_link
title = ["\"#{self.extracted_chapters}\""]
title << self.book_title
title << self.publisher
title << self.pages
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
@@ -84,12 +84,11 @@ 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(', ')
@@ -90,8 +90,8 @@ class WritingJournal
end
def create_link
title = ["\"#{self.paper_title}\""]
title << self.journal_title
title = ["#{self.paper_title}"]
title << self.journal_title if self.journal_title.present?
title.join(', ')
title << ( !self.journal_level_types.blank? ? "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})" : nil)
title.join(', ')