forked from saurabh/personal-journal
Fix a tag bug.
This commit is contained in:
parent
942e7af4d5
commit
0b91cf4086
|
@ -119,7 +119,7 @@ class JournalPaper
|
|||
if !page.nil? && page.custom_string_field == "table"
|
||||
case t
|
||||
when "paper_title"
|
||||
pd_data << { "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_journal')}' title='#{p.paper_title}' target='_blank'>#{p.paper_title}</a>" }
|
||||
pd_data << { "data_title" => "<a href=\"#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_journal')}\" title=\"#{p.paper_title}\" target='_blank'>#{p.paper_title}</a>" }
|
||||
when "level_type"
|
||||
pd_data << {"data_title" => ( !p.journal_levels.blank? ? "(#{p.journal_levels.collect{|x| x.title}.join(', ')})" : nil)}
|
||||
when "publication_date"
|
||||
|
@ -131,7 +131,7 @@ class JournalPaper
|
|||
end
|
||||
else
|
||||
if t == "paper_title"
|
||||
pd_data << { "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_journal')}' title='#{p.create_link}' target='_blank'>#{p.create_link}</a>" }
|
||||
pd_data << { "data_title" => "<a href=\"#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_journal')}\" title=\"#{p.create_link}\" target='_blank'>#{p.create_link}</a>" }
|
||||
else
|
||||
pd_data << { "data_title" => p.send(t) }
|
||||
end
|
||||
|
@ -212,7 +212,7 @@ class JournalPaper
|
|||
self.journal_paper_files.each do |file|
|
||||
url = file.journal_file.url
|
||||
title = ((file.title.blank? ? File.basename(file.journal_file.path) : file.title) rescue "")
|
||||
files << (url.nil? ? "" : "<li><a href='#{url}'' target='_blank'>#{title}</li>")
|
||||
files << (url.nil? ? "" : "<li><a href=\"#{url}\" target=\"_blank\">#{title}</a></li>")
|
||||
end
|
||||
value = files.join("")
|
||||
when "url"
|
||||
|
|
Loading…
Reference in New Issue