This commit is contained in:
BoHung Chiu 2022-08-23 19:13:08 +08:00
parent 415f79314c
commit 94e205445b
1 changed files with 2 additions and 1 deletions

View File

@ -63,8 +63,9 @@ class JournalPaper
# title << ( !self.journal_levels.blank? ? "(#{self.journal_levels.collect{|x| x.title}.join(', ')})" : nil)
if !self.publication_date.nil?
title << (self.publication_date.strftime("%b. %Y") rescue nil)
elsif self.year.present?
title << self.year
end
# title << self.year
title.delete(nil)
title.join(', ').sub(/^\\s*,/,'').gsub(/,(\s*,)+/,',').strip
end