This commit is contained in:
BoHung Chiu 2022-08-23 16:23:25 +08:00
parent d1379bf8cd
commit 5cba3dcf8b
2 changed files with 13 additions and 14 deletions

View File

@ -60,14 +60,13 @@ class JournalPaper
title << self.vol_no if (self.vol_no.present? && self.vol_no != "0")
title << self.issue_no if (self.issue_no.present? && self.issue_no != "0")
title << "pp"+self.form_to_start.to_s+"-"+self.form_to_end.to_s if (self.form_to_start.present? && self.form_to_start != "0")
title << ( !self.journal_levels.blank? ? "(#{self.journal_levels.collect{|x| x.title}.join(', ')})" : nil)
# if !self.publication_date.nil?
# pd = self.publication_date.strftime("%Y-%m-%d").split('-')
# title << pd[0]
# end
# 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)
end
# title << self.year
title.delete(nil)
title.join(', ').gsub(', ,',',')
title.join(', ').sub(/^\\s*,/,'').gsub(/,(\s*,)+/,',').strip
end
def self.get_plugin_datas_to_member(datas)